r59 - in trunk: . mapstoragemanagerarch mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap
Author: dlanglais Date: 2010-02-07 03:26:34 +0100 (Sun, 07 Feb 2010) New Revision: 59 Removed: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable1.java trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/package-info.java Modified: trunk/mapstoragemanagerarch/pom.xml trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/OurHashMap.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui/ApplicationEngine.java trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Table.java trunk/pom.xml Log: Corrections d'erreur mineurs (checkstyle... Sonar) Modified: trunk/mapstoragemanagerarch/pom.xml =================================================================== --- trunk/mapstoragemanagerarch/pom.xml 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/pom.xml 2010-02-07 02:26:34 UTC (rev 59) @@ -152,14 +152,14 @@ </properties> <build> - <resources> - <resource> - <directory>src/main/java/org/nuiton/mapstoragemanager/plugins</directory> - <excludes> - <exclude>HBase.java</exclude> - </excludes> - </resource> - </resources> + <resources> + <resource> + <directory>src/main/java/org/nuiton/mapstoragemanager/plugins</directory> + <excludes> + <exclude>HBase.java</exclude> + </excludes> + </resource> + </resources> Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java 2010-02-07 02:26:34 UTC (rev 59) @@ -4,7 +4,9 @@ import java.io.IOException; import java.net.URL; import java.util.ArrayList; +import java.util.List; import java.util.HashMap; +import java.util.Map; import org.nuiton.mapstoragemanager.plugins.BigTable; @@ -19,7 +21,7 @@ /** * A map "name of the plugin" - "plugin instance". */ - private HashMap < String, BigTable > bases = + private Map < String, BigTable > bases = new HashMap < String, BigTable > (); /** @@ -77,7 +79,7 @@ * Returns an ArrayList of all the plugins instances. * @return an ArrayList of all the plugins instances */ - public final ArrayList < BigTable > getAvailableBases() { + public final List < BigTable > getAvailableBases() { ArrayList < BigTable > bigTables = new ArrayList < BigTable > (); for (BigTable bigTable : bases.values()) { bigTables.add(bigTable); @@ -89,7 +91,7 @@ * Returns an ArrayList of all the plugins class names. * @return an ArrayList of all the plugins class names */ - public final ArrayList < String > listPlugins() { + public final List < String > listPlugins() { ArrayList < String > s = new ArrayList<String>(); for (String plugin : this.bases.keySet()) { s.add(plugin); Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,13 +1,9 @@ package org.nuiton.mapstoragemanager.core; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; import org.nuiton.mapstoragemanager.plugins.BigTable; public class MainTestCore { - private static final Log log = LogFactory.getLog(MainTestCore.class); - /** * test for plugins loading and basic functions. * @param args args @@ -15,17 +11,17 @@ public static void main(final String[] args) { Core core = new Core(); - - log.info("Plugins disponibles"); + + System.out.println("Plugins disponibles"); for (String base : core.listPlugins()) { - log.info("* " + base); + System.out.println("* " + base); } /* Test du plugins */ for (BigTable bigTable : core.getAvailableBases()) { bigTable.put("clé", "valeur"); - log.info(bigTable.get("clé")); + System.out.println(bigTable.get("clé")); } } Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-07 02:26:34 UTC (rev 59) @@ -7,6 +7,7 @@ import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; +import java.util.List; import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; @@ -27,7 +28,7 @@ /** * The plugin classes. */ - private ArrayList < Class < ? > > classes = + private List < Class < ? > > classes = new ArrayList < Class < ? > > (); /** @@ -152,7 +153,7 @@ * Returns the plugin classes. * @return the plugin classes */ - public final ArrayList < Class < ? > > getPluginsClasses() { + public final List < Class < ? > > getPluginsClasses() { return classes; } Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,8 +1,6 @@ package org.nuiton.mapstoragemanager.core; import java.net.MalformedURLException; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; /** * @author fdesbois @@ -11,13 +9,12 @@ @Deprecated public class TestServiceLoader { - private static final Log log = LogFactory.getLog(TestServiceLoader.class); - public TestServiceLoader() { try { BigTableLoader p = - new BigTableLoader("plugins", this.getClass().getClassLoader()); - log.info(p.getBigTable()); + new BigTableLoader("plugins", + this.getClass().getClassLoader()); + System.out.println(p.getBigTable()); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,8 +1,8 @@ + import java.io.IOException; +import java.util.ArrayList; import java.util.HashSet; import java.util.Set; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; import org.nuiton.mapstoragemanager.plugins.BigTable; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -14,76 +14,73 @@ import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; - public class HBase implements BigTable { - private static final Log log = LogFactory.getLog(BigTable.class); - - private HBaseConfiguration config; - private HTable table; - private String familyName = "mylittlecolumnfamily"; - private String rowName = "myLittleRow"; - private String tableName = "mylittletable"; - - public HBase(){ - // You need a configuration object to tell the client where to connect. - // When you create a HBaseConfiguration, it reads in whatever you've set - // into your hbase-site.xml and in hbase-default.xml, as long as these can - // be found on the CLASSPATH - org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(); - config = new HBaseConfiguration(conf); - log.info("test"); - selectTable(tableName); - put("test", "val"); - put("test", "val2"); - put("test2", "val3"); - } - - @Override - public void put(String key, String value) { - - // To add to a row, use Put. A Put constructor takes the name of the row - // you want to insert into as a byte array. In HBase, the Bytes class has - // utility for converting all kinds of java types to byte arrays. In the - // below, we are converting the String "myLittleRow" into a byte array to - // use as a row key for our update. Once you have a Put instance, you can - // adorn it by setting the names of columns you want to update on the row, - // the timestamp to use in your update, etc.If no timestamp, the server - // applies current time to the edits. - Put p = new Put(Bytes.toBytes(rowName)); + private HBaseConfiguration config; + private HTable table; + private String familyName = "mylittlecolumnfamily"; + private String rowName = "myLittleRow"; + private String tableName = "mylittletable"; - // To set the value you'd like to update in the row 'myRow', specify the - // column family, column qualifier, and value of the table cell you'd like - // to update. The column family must already exist in your table schema. - // The qualifier can be anything. All must be specified as byte arrays as - // hbase is all about byte arrays. Lets pretend the table - // 'myLittleHBaseTable' was created with a family 'myLittleFamily'. - p.add(Bytes.toBytes(familyName), Bytes.toBytes(key), - Bytes.toBytes(value)); + public HBase() { + // You need a configuration object to tell the client where to connect. + // When you create a HBaseConfiguration, it reads in whatever you've set + // into your hbase-site.xml and in hbase-default.xml, as long as these can + // be found on the CLASSPATH + org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration(); + config = new HBaseConfiguration(conf); + System.out.println("test"); + selectTable(tableName); + put("test", "val"); + put("test", "val2"); + put("test2", "val3"); + } - // Once you've adorned your Put instance with all the updates you want to - // make, to commit it do the following (The HTable#put method takes the - // Put instance you've been building and pushes the changes you made into - // hbase) + @Override + public void put(String key, String value) { - /*try { - table.put(p); - } catch (IOException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } -*/ - } + // To add to a row, use Put. A Put constructor takes the name of the row + // you want to insert into as a byte array. In HBase, the Bytes class has + // utility for converting all kinds of java types to byte arrays. In the + // below, we are converting the String "myLittleRow" into a byte array to + // use as a row key for our update. Once you have a Put instance, you can + // adorn it by setting the names of columns you want to update on the row, + // the timestamp to use in your update, etc.If no timestamp, the server + // applies current time to the edits. + Put p = new Put(Bytes.toBytes(rowName)); - @Override - public String get(String key) { - - // Now, to retrieve the data we just wrote. The values that come back are - // Result instances. Generally, a Result is an object that will package up - // the hbase return into the form you find most palatable. - Get g = new Get(Bytes.toBytes(rowName)); - Result r; - byte [] value = null; + // To set the value you'd like to update in the row 'myRow', specify the + // column family, column qualifier, and value of the table cell you'd like + // to update. The column family must already exist in your table schema. + // The qualifier can be anything. All must be specified as byte arrays as + // hbase is all about byte arrays. Lets pretend the table + // 'myLittleHBaseTable' was created with a family 'myLittleFamily'. + p.add(Bytes.toBytes(familyName), Bytes.toBytes(key), + Bytes.toBytes(value)); + + // Once you've adorned your Put instance with all the updates you want to + // make, to commit it do the following (The HTable#put method takes the + // Put instance you've been building and pushes the changes you made into + // hbase) + + /*try { + table.put(p); + } catch (IOException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + */ + } + + @Override + public String get(String key) { + + // Now, to retrieve the data we just wrote. The values that come back are + // Result instances. Generally, a Result is an object that will package up + // the hbase return into the form you find most palatable. + Get g = new Get(Bytes.toBytes(rowName)); + Result r; + byte[] value = null; // try { // r = table.get(g); // value = r.getValue(Bytes.toBytes(familyName), @@ -91,80 +88,78 @@ // } catch (IOException e) { // e.printStackTrace(); // } - - // If we convert the value bytes, we should get back 'Some Value', the - // value we inserted at this location. - String valueStr = Bytes.toString(value); - - return "valeur"; - //return valueStr; - } - @Override - public Set<String> getKeys() { - - Set<String> keySet = new HashSet<String>(); + // If we convert the value bytes, we should get back 'Some Value', the + // value we inserted at this location. + String valueStr = Bytes.toString(value); - // Sometimes, you won't know the row you're looking for. In this case, you - // use a Scanner. This will give you cursor-like interface to the contents - // of the table. To set up a Scanner, do like you did above making a Put - // and a Get, create a Scan. Adorn it with column names, etc. - Scan s = new Scan(); - //s.addColumn(Bytes.toBytes(familyName), Bytes.toBytes("test")); - ResultScanner scanner = null; - try { - scanner = table.getScanner(s); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - // Scanners return Result instances. - // Now, for the actual iteration. One way is to use a while loop like so: - try { - for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { - // print out the row we found and the columns we were looking for - System.out.println("Found row: " + rr); - keySet.add(rr.toString()); - } - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + return "valeur"; + //return valueStr; + } - // The other approach is to use a foreach loop. Scanners are iterable! - // for (Result rr : scanner) { - // System.out.println("Found row: " + rr); - // } - } finally { - // Make sure you close your scanners when you are done! - // Thats why we have it inside a try/finally clause - scanner.close(); - } - - return keySet; - } - - public void selectTable(String tableName){ - // This instantiates an HTable object that connects you to - // the "myLittleHBaseTable" table. - try { - table = new HTable(config, tableName); - } catch (IOException e) { - e.printStackTrace(); - } - } + @Override + public Set<String> getKeys() { - @Override - public void connect(String host, String base, String username, - String password) { - // TODO Auto-generated method stub - - } - - public static void main(String[] args) { - HBase h = new HBase(); - } + Set<String> keySet = new HashSet<String>(); + // Sometimes, you won't know the row you're looking for. In this case, you + // use a Scanner. This will give you cursor-like interface to the contents + // of the table. To set up a Scanner, do like you did above making a Put + // and a Get, create a Scan. Adorn it with column names, etc. + Scan s = new Scan(); + //s.addColumn(Bytes.toBytes(familyName), Bytes.toBytes("test")); + ResultScanner scanner = null; + try { + scanner = table.getScanner(s); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + try { + // Scanners return Result instances. + // Now, for the actual iteration. One way is to use a while loop like so: + try { + for (Result rr = scanner.next(); rr != null; rr = scanner.next()) { + // print out the row we found and the columns we were looking for + System.out.println("Found row: " + rr); + keySet.add(rr.toString()); + } + + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + // The other approach is to use a foreach loop. Scanners are iterable! + // for (Result rr : scanner) { + // System.out.println("Found row: " + rr); + // } + } finally { + // Make sure you close your scanners when you are done! + // Thats why we have it inside a try/finally clause + scanner.close(); + } + + return keySet; + } + + public void selectTable(String tableName) { + // This instantiates an HTable object that connects you to + // the "myLittleHBaseTable" table. + try { + table = new HTable(config, tableName); + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void connect(String host, String base, String username, + String password) { + // TODO Auto-generated method stub + } + + public static void main(String[] args) { + HBase h = new HBase(); + } } Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/OurHashMap.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/OurHashMap.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/OurHashMap.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,30 +1,34 @@ package org.nuiton.mapstoragemanager.plugins; import java.util.HashMap; +import java.util.Map; import java.util.Set; -public class OurHashMap implements BigTable { +public class OurHashMap implements BigTable{ - HashMap<String, String> map = new HashMap<String, String>(); + private Map<String,String> map = new HashMap<String, String>(); + + public String get(String key) { + return map.get(key); + } - public String get(String key) { - return map.get(key); - } + public Set<String> getKeys() { + return map.keySet(); + } - public Set<String> getKeys() { - return map.keySet(); - } + public void put(String key, String value) { + map.put(key, value); + } - public void put(String key, String value) { - map.put(key, value); - } + public void connect(String host, String base, String username, + String password) { + // TODO Auto-generated method stub + + } - public void connect(String host, String base, String username, - String password) { - // TODO Auto-generated method stub - } + public void selectTable(String table) { + // TODO Auto-generated method stub + + } - public void selectTable(String table) { - // TODO Auto-generated method stub - } } Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java 2010-02-07 02:26:34 UTC (rev 59) @@ -9,123 +9,127 @@ */ public interface nvBigTable { - /** + /** * Connects to the database. * @param host the server - * @param port the port + * @param port the port * @param base the base name * @param username the user login * @param passwd the user password - * @return return true if connexion is established, else return false. + * @return return true if connexion is established, else return false. */ - boolean connect( - String host, int port, String base, String username, String passwd); + boolean connect( + String host, int port, String base, String username,String passwd); - /****************** - * Tables * - ******************/ + /****************** + * Tables * + ******************/ + /** * Selects the table. * @param table the table to select */ void selectTable(String table); - /** - * Create a new table in the base. - * @param table the name of the new table - */ - void createTable(String table); + /** + * Create a new table in the base. + * @param table the name of the new table + */ + void createTable(String table); - /** - * Delete a table in the base. - * @param table the table of the table to delete - */ - void deleteTable(String table); + /** + * Delete a table in the base. + * @param table the table of the table to delete + */ + void deleteTable(String table); - /** - * Get the tables' name which are in the base. - * @return Return a set containing the tables' name - */ - Set<String> getTablesNames(); + /** + * Get the tables' name which are in the base. + * @return Return a set containing the tables' name + */ + Set<String> getTablesNames(); - /******************* - * Columns * - *******************/ - /** - * Create a new column in a table. - * Add a column <b>column</b> in the table <b>table</b> - * @param table the table name - * @param column the column name - */ - void createColumn(String table, String column); - /** - * Delete a column in a table. - * Delete the column <b>column</b> in the table <b>table</b> - * @param table the table name - * @param column the column name - */ - void deleteColumn(String table, String column); + /******************* + * Columns * + *******************/ - /** - * Get the columns' name of one table. + /** + * Create a new column in a table. + * Add a column <b>column</b> in the table <b>table</b> + * @param table the table name + * @param column the column name + */ + void createColumn(String table, String column); + + /** + * Delete a column in a table. + * Delete the column <b>column</b> in the table <b>table</b> + * @param table the table name + * @param column the column name + */ + void deleteColumn(String table, String column); + + /** + * Get the columns' name of one table. * @param table the table name - * @return Return a set containing the columns' name of the table + * @return Return a set containing the columns' name of the table * <b>table</b> - */ - Set<String> getColumnsNames(String table); + */ + Set<String> getColumnsNames(String table); - /*************** - * Cell * - ***************/ - /** - * Put a new content in the table. - * Put a new <b>content</b> in the column <b>column</b> of the table - * <b>table</b> with the key <b>key</b>. - * @param table the table name - * @param column the column name - * @param key the key - * @param content the content to add - */ - void put(String table, String column, String key, String content); + /*************** + * Cell * + ***************/ - /** - * Get a content in the table. - * Get a content in the table <b>table</b> from the column <b>column</b> - * where the key is <b>key</b>. - * -> get the last value (with the greater timestamp). - * @param table the table name. - * @param column the column name. - * @param key the key - * @return the content - */ - String get(String table, String column, String key); + /** + * Put a new content in the table. + * Put a new <b>content</b> in the column <b>column</b> of the table + * <b>table</b> with the key <b>key</b>. + * @param table the table name + * @param column the column name + * @param key the key + * @param content the content to add + */ + void put(String table, String column, String key, String content); - /** - * Get a content in the table. - * Get a content in the table <b>table</b> from the column <b>column</b> - * where the key is <b>key</b>. - * -> get the content with the version <b>version</b>. - * @param table the table name. - * @param column the column name. - * @param key the key - * @param version - * @return the content - */ - String get(String table, String column, String key, int version); + /** + * Get a content in the table. + * Get a content in the table <b>table</b> from the column <b>column</b> + * where the key is <b>key</b>. + * -> get the last value (with the greater timestamp). + * @param table the table name. + * @param column the column name. + * @param key the key + * @return the content + */ + String get(String table, String column, String key); - /** - * Get the row identified by the key <b>key<b> from the table <b>table</b> - * @param table the table name - * @param key the key - * @return a Map with key is column's name and value is content's value. - */ - Map<String, String> getRow(String table, String key); + /** + * Get a content in the table. + * Get a content in the table <b>table</b> from the column <b>column</b> + * where the key is <b>key</b>. + * -> get the content with the version <b>version</b>. + * @param table the table name. + * @param column the column name. + * @param key the key + * @param version + * @return the content + */ + String get(String table, String column, String key, int version); - /** - * Get the keys from a table. - * @param table the table - * @return return a Set containing the keys a the table <b>table</b>. - */ - Set<String> getKeys(String table); + /** + * Get the row identified by the key <b>key<b> from the table <b>table</b> + * @param table the table name + * @param key the key + * @return a Map with key is column's name and value is content's value. + */ + Map<String, String> getRow(String table, String key); + + /** + * Get the keys from a table. + * @param table the table + * @return return a Set containing the keys a the table <b>table</b>. + */ + Set<String> getKeys(String table); } Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui/ApplicationEngine.java =================================================================== --- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui/ApplicationEngine.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui/ApplicationEngine.java 2010-02-07 02:26:34 UTC (rev 59) @@ -3,8 +3,6 @@ import java.util.Locale; import java.util.ResourceBundle; import javax.swing.JOptionPane; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.logging.Log; /** * Engine Class with methods for application user interface. @@ -13,8 +11,6 @@ */ public class ApplicationEngine { - private static final Log log = LogFactory.getLog(ApplicationEngine.class); - Locale currentLocale; ResourceBundle messages; @@ -46,6 +42,7 @@ public void setLocale(String language, String country) { currentLocale= new Locale(language,country); messages = ResourceBundle.getBundle("mapstoragemanager",currentLocale); - log.info("ok"); + System.out.println(messages.getString("ok")); + } } Modified: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Table.java =================================================================== --- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Table.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/Table.java 2010-02-07 02:26:34 UTC (rev 59) @@ -26,9 +26,9 @@ void deleteColumn(final String columnName); /** - * Get the columns' name of the table. - * @return Return a set containing the columns' name of the table - */ + * Get the columns' name of the table. + * @return Return a set containing the columns' name of the table + */ Set<String> getColumnsNames(); /** Deleted: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable1.java =================================================================== --- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable1.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable1.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,135 +0,0 @@ -package org.nuiton.mapstoragemanager.plugins; - -import java.util.Map; -import java.util.Set; - -/** - * The interface for all the BigTable implementations. - * @author Dorian Langlais - */ -public interface nvBigTable1 { - - /** - * Connects to the database. - * @param host the server - * @param port the port - * @param base the base name - * @param username the user login - * @param passwd the user password - * @return return true if connexion is established, else return false. - */ - boolean connect( - String host, int port, String base, String username,String passwd); - - /****************** - * Tables * - ******************/ - - /** - * Selects the table. - * @param table the table to select - */ - void selectTable(String table); - - /** - * Create a new table in the base. - * @param table the name of the new table - */ - void createTable(String table); - - /** - * Delete a table in the base. - * @param table the table of the table to delete - */ - void deleteTable(String table); - - /** - * Get the tables' name which are in the base. - * @return Return a set containing the tables' name - */ - Set<String> getTablesNames(); - - - /******************* - * Columns * - *******************/ - - /** - * Create a new column in a table. - * Add a column <b>column</b> in the table <b>table</b> - * @param table the table name - * @param column the column name - */ - void createColumn(String table, String column); - - /** - * Delete a column in a table. - * Delete the column <b>column</b> in the table <b>table</b> - * @param table the table name - * @param column the column name - */ - void deleteColumn(String table, String column); - - /** - * Get the columns' name of one table. - * @param table the table name - * @return Return a set containing the columns' name of the table - * <b>table</b> - */ - Set<String> getColumnsNames(String table); - - /*************** - * Cell * - ***************/ - - /** - * Put a new content in the table. - * Put a new <b>content</b> in the column <b>column</b> of the table - * <b>table</b> with the key <b>key</b>. - * @param table the table name - * @param column the column name - * @param key the key - * @param content the content to add - */ - void put(String table, String column, String key, String content); - - /** - * Get a content in the table. - * Get a content in the table <b>table</b> from the column <b>column</b> - * where the key is <b>key</b>. - * -> get the last value (with the greater timestamp). - * @param table the table name. - * @param column the column name. - * @param key the key - * @return the content - */ - String get(String table, String column, String key); - - /** - * Get a content in the table. - * Get a content in the table <b>table</b> from the column <b>column</b> - * where the key is <b>key</b>. - * -> get the content with the version <b>version</b>. - * @param table the table name. - * @param column the column name. - * @param key the key - * @param version - * @return the content - */ - String get(String table, String column, String key, int version); - - /** - * Get the row identified by the key <b>key<b> from the table <b>table</b> - * @param table the table name - * @param key the key - * @return a Map with key is column's name and value is content's value. - */ - Map<String, String> getRow(String table, String key); - - /** - * Get the keys from a table. - * @param table the table - * @return return a Set containing the keys a the table <b>table</b>. - */ - Set<String> getKeys(String table); -} Deleted: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/package-info.java =================================================================== --- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/package-info.java 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/package-info.java 2010-02-07 02:26:34 UTC (rev 59) @@ -1,5 +0,0 @@ -package org.nuiton.mapstoragemanager.plugins; -/** - * The plugins interfaces. - */ - Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2010-02-07 01:17:05 UTC (rev 58) +++ trunk/pom.xml 2010-02-07 02:26:34 UTC (rev 59) @@ -123,28 +123,28 @@ </properties> <build> - <!--<resources> - <resource> - <directory>src/main/java/org/nuiton/mapstoragemanager/plugins</directory> - <excludes> - <exclude>HBase.java</exclude> - </excludes> - </resource> - </resources>--> + <!--<resources> + <resource> + <directory>src/main/java/org/nuiton/mapstoragemanager/plugins</directory> + <excludes> + <exclude>HBase.java</exclude> + </excludes> + </resource> + </resources>--> <plugins> - <!--<plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <excludes> - <exclude>org/nuiton/mapstoragemanager/plugins/HBase.java</exclude> - </excludes> - </configuration> - </plugin>--> + <!--<plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <excludes> + <exclude>org/nuiton/mapstoragemanager/plugins/HBase.java</exclude> + </excludes> + </configuration> + </plugin>--> <plugin> <groupId>org.nuiton.jaxx</groupId>
participants (1)
-
dlanglais@users.nuiton.org