Mapstoragemanager-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
February 2010
- 7 participants
- 101 discussions
Author: afages
Date: 2010-02-11 09:49:19 +0100 (Thu, 11 Feb 2010)
New Revision: 70
Added:
trunk/docs/analyse/HowToHbase.rst
trunk/docs/analyse/analyseBT.rst
trunk/docs/analyse/msm.zargo
trunk/docs/analyse/projetHBase.rst
Log:
Ajout des documents d'analyse (docs/analyse)
Added: trunk/docs/analyse/HowToHbase.rst
===================================================================
--- trunk/docs/analyse/HowToHbase.rst (rev 0)
+++ trunk/docs/analyse/HowToHbase.rst 2010-02-11 08:49:19 UTC (rev 70)
@@ -0,0 +1,71 @@
+
+How to Hbase
+============
+
+Préparation de l'environnement de travail
+-----------------------------------------
+
+prérequis : (nous travaillerons sur linux)
+ - SSH doit être installé.
+
+Télécharger Hadoop :
+ftp://ftp.inria.fr/pub/Apache/hadoop/core/hadoop-0.20.1/hadoop-0.20.1.tar.gz
+Télécharger Hbase :
+ftp://ftp.inria.fr/pub/Apache/hadoop/hbase/hbase-0.20.2/hbase-0.20.2.tar.gz
+
+Dézipper les archives...
+
+Variables d'environnement
+-------------------------
+
+Créer deux variables d'environnement "Hadoop_HOME" et "HBase_HOME" localisant les dossiers Hadoop-0.20.1 et HBase-0.20.2.
+Ouvrir les fichiers ${Hadoop_Home}/conf/hadoop-env.sh et ${HBase_Home}/conf/hbase-env.sh et modifier/ajouter la variable d'environnement JAVA_HOME.
+
+Lancement des daemons
+---------------------
+
+Lancement du daemon hadoop :
+${Hadoop_HOME}/bin/start-dfs.sh
+
+Lancement du daemon hbase :
+${HBase_HOME}/bin/start-hbase.sh
+
+Lancement du shell Hbase
+------------------------
+
+${HBase_HOME}/bin/hbase shell
+
+Exemple
+-------
+
+hbase> # Type "help" to see shell help screen
+hbase> help
+hbase> # To create a table named "mylittletable" with a column family of "mylittlecolumnfamily", type
+hbase> create "mylittletable", "mylittlecolumnfamily"
+hbase> # To see the schema for you just created "mylittletable" table and its single "mylittlecolumnfamily", type
+hbase> describe "mylittletable"
+hbase> # To add a row whose id is "x", to the column "mylittlecolumnfamily:x" with a value of 'x', do
+hbase> put "mylittletable", "x"
+hbase> # To get the cell just added, do
+hbase> get "mylittletable", "x"
+hbase> # To scan you new table, do
+hbase> scan "mylittletable"
+
+Arrêt des daemons
+-----------------
+
+Lancement du daemon hadoop :
+${HADOOP_HOME}/bin/stop-dfs.sh
+(On va dire que l'action n'est pas très rapide... Si elle marche.. ?)
+
+Lancement du daemon hbase :
+${HBASE_HOME}/bin/stop-hbase.sh
+${HBASE_HOME}/bin/stop-all.sh
+(??? pour le premier il faut renseigner le nom du node ? Pour le second, je doute fort qu'il éteigne bien le daemon..)
+---> Problème de port à la fac, je suppose.
+
+
+
+
+So It's done
+Now you have to work !
\ No newline at end of file
Property changes on: trunk/docs/analyse/HowToHbase.rst
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/docs/analyse/analyseBT.rst
===================================================================
--- trunk/docs/analyse/analyseBT.rst (rev 0)
+++ trunk/docs/analyse/analyseBT.rst 2010-02-11 08:49:19 UTC (rev 70)
@@ -0,0 +1,92 @@
+Analyse de BigTable (de google Inc.)
+=====================================
+
+But de l'analyse
+----------------
+
+Permettre la compréhension de Big Table et de ses diverses implémentations
+ainsi que l'extraction d'interface pour le projet MSM.
+
+Introduction : Qu'est-ce que BigTable ?
+---------------------------------------
+
+BigTable est la spécification d'un système de stockage distribué permettant
+de gérer des données. Il est conçu pour s'adapter fiablement à des tailles
+de contenu allant jusqu'au "Peta". BigTable est utilisé pour plusieurs raisons :
+
+- Toucher un large ensemble d'applications
+- Mise à l'échelle
+- Très bonnes performances (temps de réponse...)
+- Forte disponibilité
+
+Le modèle de données de BigTable
+--------------------------------
+
+Le modèle de données de BigTable se comporte comme un dictionnaire
+multidimensionnel (matrice) indexé par le triplet
+<row key, column key, timestamp>. Chaque valeur de ce dictionnaire
+est un table d'octets.
+
+Les clés pour une rangée du dictionnaire sont des chaînes de charactères
+arbitraires et BigTable maintient les données dans un ordre lexicographique
+grâce à ce type de clé.
+
+ex de clé de rangée : "com.google.maps/index.html" (reversed URL)
+
+La portée d'une rangée est appelée "tablet", unité de distribution et d'équilibrage
+de charge.
+
+Les clés de colonne sont groupées en ensembles appelés "famille de colonnes".
+Une clé de colonne est nommé suivant le schéma : family:qualifier.
+Les noms de famille doivent être lisibles facilement mais les qualificateurs peuvent
+être des chaînes de charactères arbitraires
+
+ex de famille de colonne : "contents:"
+
+Ainsi, le contenu d'une cellule indexée par <com.google.maps/index.html, contents:, ?>
+serait le contenu de la page "index.html" (le code html).
+Une cellule peut contenir plusieurs versions de la même donnée via le mécanisme de timestamp.
+Chaque cellule stocke plusieurs timestamp en ordre décroissant si bien que :
+
+- <com.google.maps/index.html, contents:, ts1> donne la version la plus récente du contenu.
+- <com.google.maps/index.html, contents:, ts2> donne une version plus ancienne du contenu.
+
+Stockage
+--------
+
+BigTable utilise le système de fichier google GFS (Google File System)
+pour stocker les logs et fichiers de données.
+
+Le format de fichier google SSTable est utilisé pour stocker les données
+internes à BigTable.
+
+API BigTable (client)
+---------------------
+
+Voici les fonctionnalités prévues par la spécification BigTable :
+
+- Création de tables.
+- Création de familles de colonne.
+- Suppression de tables.
+- Suppression de familles de colonne.
+- Changement de cluster (?).
+- Changement de table.
+- Changement de méta données sur une famille de colonne (droits d'accès...).
+- Ecriture des données dans une table.
+- Suppression des données dans une table.
+- Recherche des données dans une table depuis des rangées individuelles.
+- Itération sur un sous-ensemble de données d'une table.
+- Manipulation avancée des données : Transactions "Lecture - Modification - Ecriture"
+sur une rangée simple (BigTable ne supporte pas les transactions par rangées multiples).
+- Utilisation des cellules comme compteurs d'entier.
+- Excécution de scripts clients dans l'espace d'adressage des serveurs (langage : sawzall).
+- Calcul parallèle avec le framework MapReduce.
+
+Source
+------
+
+Cette analyse est une synthèse des éléments utiles dans le cadre du projet, issue de la
+spécification même de Google Inc.
+"BigTable: A Distributed Storage System for Structured Data"
+
+lien : labs.google.com/papers/bigtable-osdi06.pdf
Added: trunk/docs/analyse/msm.zargo
===================================================================
(Binary files differ)
Property changes on: trunk/docs/analyse/msm.zargo
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/docs/analyse/projetHBase.rst
===================================================================
--- trunk/docs/analyse/projetHBase.rst (rev 0)
+++ trunk/docs/analyse/projetHBase.rst 2010-02-11 08:49:19 UTC (rev 70)
@@ -0,0 +1,40 @@
+// mardi 12 janvier 2010
+
+Technologies
+------------
+
+ - UML
+ - JAVA
+ - JMX
+ - Jaxx / Swing
+ - HBase
+ - XML
+ - SVN
+ - RST
+ - Maven
+
+Contraintes
+------------
+
+- L'encodage des fichiers doit être en UTF-8.
+- La norme checkstyle de sun doit être utilisée pour le code java (http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html)
+- Pour les diagrammes UML, l'outil ArgoUML (v 0.28.1) doit être employé.
+- Utilisation de Maven2 pour la construction, génération du site web…
+- Couverture du code à 80%
+- Environnement de développement libre (Eclipse, Netbeans, Vim)
+- Utilisation de rst (ReStructuredText) pour la documentation
+- Projet sous licence GPL v3
+- Code source en anglais
+
+Définitions
+-----------
+
+HBase
+
+HMap
+
+RST
+
+
+
+
1
0
Author: gcrieloue
Date: 2010-02-11 09:49:18 +0100 (Thu, 11 Feb 2010)
New Revision: 69
Added:
trunk/src/site/doc/plugins/
trunk/src/site/doc/plugins/howto.rst
Log:
Ajout d'un howTo pour la cr?\195?\169ation de plugins.
Added: trunk/src/site/doc/plugins/howto.rst
===================================================================
--- trunk/src/site/doc/plugins/howto.rst (rev 0)
+++ trunk/src/site/doc/plugins/howto.rst 2010-02-11 08:49:18 UTC (rev 69)
@@ -0,0 +1,12 @@
+
+
+Comment développer un plugin pour l'application
+===============================================
+
+* créer un dossier META-INF/services
+* créer un fichier nommé "nom_de_l_interface_implémentée" dans ce dossier
+ ex : org.nuiton.mapstoragemanager.plugins.BigTable
+* dans ce fichier écrire simplement le nom de la classe implémentant l'interface spécifiée
+ ex : org.alma.mapstoragemanager.plugins.HBasePlugin
+* créer un jar contenant vos classes et le dossier META-INF
+* placer ce jar dans le dossier plugins
1
0
Author: afages
Date: 2010-02-11 09:48:52 +0100 (Thu, 11 Feb 2010)
New Revision: 68
Added:
trunk/docs/
trunk/docs/analyse/
trunk/docs/rapports_suivi/
Log:
Ajout des documents d'analyse (docs/analyse)
1
0
Author: dlanglais
Date: 2010-02-10 07:50:08 +0100 (Wed, 10 Feb 2010)
New Revision: 67
Added:
trunk/msm-hbase/
trunk/msm-hbase/LICENSE.txt
trunk/msm-hbase/README.txt
trunk/msm-hbase/changelog.txt
trunk/msm-hbase/pom.xml
trunk/msm-hbase/src/
trunk/msm-hbase/src/main/
trunk/msm-hbase/src/main/java/
trunk/msm-hbase/src/main/java/org/
trunk/msm-hbase/src/main/java/org/nuiton/
trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/
trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/
trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/hbase/
trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/hbase/HBase.java
trunk/msm-hbase/src/main/resources/
trunk/msm-hbase/src/main/resources/i18n/
trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-en_GB.properties
trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-fr_FR.properties
trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-en_GB.properties
trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-fr_FR.properties
trunk/msm-hbase/src/main/resources/i18n/msn-bighashmap-fr_FR.properties
trunk/msm-hbase/src/main/resources/log4j.properties
trunk/msm-hbase/src/site/
trunk/msm-hbase/src/site/doc/
trunk/msm-hbase/src/site/doc/attachment.sh
trunk/msm-hbase/src/site/doc/maven_hbase.rst
trunk/msm-hbase/src/test/
trunk/msm-hbase/src/test/java/
trunk/msm-hbase/src/test/java/org/
trunk/msm-hbase/src/test/java/org/nuiton/
trunk/msm-hbase/src/test/java/org/nuiton/mapstoragemanager/
trunk/msm-hbase/src/test/java/org/nuiton/mapstoragemanager/plugins/
trunk/msm-hbase/src/test/java/org/nuiton/mapstoragemanager/plugins/hbase/
trunk/msm-hbase/src/test/resources/
trunk/msm-hbase/src/test/resources/log4j.properties
trunk/src/
trunk/src/site/
trunk/src/site/doc/
trunk/src/site/doc/bigtable/
trunk/src/site/doc/bigtable/HowToHbase.rst
trunk/src/site/doc/bigtable/analyseBT.rst
trunk/src/site/doc/bigtable/bigTable.pdf
trunk/src/site/doc/bigtable/hbase-files.png
trunk/src/site/doc/bigtable/projetHBase.rst
trunk/src/site/reports/
trunk/src/site/reports/week3.rst
trunk/src/site/reports/week4.rst
trunk/src/site/reports/week5.rst
trunk/src/site/rst/
Removed:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java
trunk/mapstoragemanagerarch/src/site/doc/
trunk/mapstoragemanagerarch/src/site/reports/
trunk/mapstoragemanagerarch/src/site/rst/
Modified:
trunk/mapstoragemanagerarch/pom.xml
trunk/pom.xml
Log:
Tout d'abord :
- Les docs "g?\195?\169n?\195?\169raux" sur le projet sont remont?\195?\169s ?\195?\160 la racine (ils ?\195?\169taient rest?\195?\169 dans mapstoragemanagerarch/src/site/**).
- S?\195?\169paration du "d?\195?\169but" de plugin Hbase dans un module MSM-HBase s?\195?\169par?\195?\169.
- Ajout du script founis par Stephane Chorlet dans le site de ce m?\195?\170me plugin.
Modified: trunk/mapstoragemanagerarch/pom.xml
===================================================================
--- trunk/mapstoragemanagerarch/pom.xml 2010-02-09 14:52:00 UTC (rev 66)
+++ trunk/mapstoragemanagerarch/pom.xml 2010-02-10 06:50:08 UTC (rev 67)
@@ -152,20 +152,20 @@
</properties>
<build>
- <resources>
+ <!--<resources>
<resource>
<directory>src/main/java/org/nuiton/mapstoragemanager/plugins</directory>
<excludes>
<exclude>HBase.java</exclude>
</excludes>
</resource>
- </resources>
+ </resources>-->
<plugins>
- <plugin>
+ <!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
@@ -173,7 +173,7 @@
<exclude>org/nuiton/mapstoragemanager/plugins/HBase.java</exclude>
</excludes>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<groupId>org.nuiton.jaxx</groupId>
Deleted: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-09 14:52:00 UTC (rev 66)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-10 06:50:08 UTC (rev 67)
@@ -1,175 +0,0 @@
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.mapstoragemanager.plugins.BigTable;
-
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HTable;
-import org.apache.hadoop.hbase.client.Put;
-import org.apache.hadoop.hbase.client.Result;
-import org.apache.hadoop.hbase.client.ResultScanner;
-import org.apache.hadoop.hbase.client.Scan;
-import org.apache.hadoop.hbase.util.Bytes;
-
-public class HBase implements BigTable {
-
- /**
- * Logger.
- */
- private static final Log LOG = LogFactory.getLog(HBase.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));
-
- // 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),
-// Bytes.toBytes(key));
-// } 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>();
-
- // 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();
- LOG.error(e.toString(), e);
- }
- 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);
- LOG.info("Found row: " + rr);
- keySet.add(rr.toString());
- }
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- //e.printStackTrace();
- LOG.error(e.toString(), e);
- }
-
- // 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();
- LOG.error(e.toString(), e);
- }
- }
-
- @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();
- }
-}
Added: trunk/msm-hbase/LICENSE.txt
===================================================================
--- trunk/msm-hbase/LICENSE.txt (rev 0)
+++ trunk/msm-hbase/LICENSE.txt 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Added: trunk/msm-hbase/changelog.txt
===================================================================
--- trunk/msm-hbase/changelog.txt (rev 0)
+++ trunk/msm-hbase/changelog.txt 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,2 @@
+Changelog is not any longer maintained, please refer to the release note :
+ http://maven-site.nuiton.org/mapstoragemanager/changes-report.html
Added: trunk/msm-hbase/pom.xml
===================================================================
--- trunk/msm-hbase/pom.xml (rev 0)
+++ trunk/msm-hbase/pom.xml 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- repository containing the parent pom. -->
+ <repositories>
+ <repository>
+ <id>org.nuiton</id>
+ <url>http://maven.nuiton.org/release</url>
+ </repository>
+ </repositories>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom4redmine</artifactId>
+ <version>2.0.4</version>
+ </parent>
+
+ <version>0.1-SNAPSHOT</version>
+ <artifactId>msn-hbase</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mapstoragemanagerarch</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${lutinutil.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+
+ <!--Jaxx-->
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-widgets</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+ <!-- JUnit for tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>MSM-HBase</name>
+
+ <description>Creation of a graphic user interface for Hbase </description>
+ <inceptionYear>2010</inceptionYear>
+
+ <developers>
+ <developer>
+ <id>tchemit</id>
+ <name>Tony Chemit</name>
+ <email>chemit(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>fdesbois</id>
+ <name>Florian Desbois</name>
+ <email>fdesbois(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>fgilet</id>
+ <name>Florent Gilet</name>
+ <email>florent.gilet(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>gcrieloue</id>
+ <name>Gilles Crieloue</name>
+ <email>gilles.crieloue(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>afages</id>
+ <name>Amaury Fages</name>
+ <email>amaury.fages(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>dlanglais</id>
+ <name>Dorian langlais</name>
+ <email>dorain.langlais(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+ <packaging>jar</packaging>
+
+ <properties>
+
+ <!-- main class in jar
+ <maven.jar.main.class>org.nuiton.mapstoragemanager.Main</maven.jar.main.class>-->
+ <jaxx.version>2.0.0-beta-3</jaxx.version>
+ <lutinutil.version>1.1.2</lutinutil.version>
+ <i18n.version>1.0.1</i18n.version>
+
+ <!-- jaxx
+ <jaxx.useUIManagerForIcon>true</jaxx.useUIManagerForIcon>
+ <jaxx.addProjectClassPath>true</jaxx.addProjectClassPath>
+ <jaxx.addSourcesToClassPath>true</jaxx.addSourcesToClassPath>-->
+ </properties>
+
+ <build>
+
+ <resources>
+ <resource>
+ <directory>src/main/java/org/nuiton/mapstoragemanager/plugins/hbase</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/HBase.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+
+ <!--<plugin>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <version>${jaxx.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>${i18n.version}</version>
+ <configuration>
+ silent>true</silent
+ <entries>
+ <entry>
+ <basedir>${maven.gen.dir}/java/</basedir>
+ </entry>
+ </entries>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>-->
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-deps</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <silent>true</silent>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <copyToMETA_INF>true</copyToMETA_INF>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>./lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- plugin site -->
+ <!--<plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>${jrst.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>-->
+
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
+
+
Added: trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/hbase/HBase.java
===================================================================
--- trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/hbase/HBase.java (rev 0)
+++ trunk/msm-hbase/src/main/java/org/nuiton/mapstoragemanager/plugins/hbase/HBase.java 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,176 @@
+package org.nuiton.mapstoragemanager.plugins.hbase;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.mapstoragemanager.plugins.BigTable;
+
+import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.client.Get;
+import org.apache.hadoop.hbase.client.HTable;
+import org.apache.hadoop.hbase.client.Put;
+import org.apache.hadoop.hbase.client.Result;
+import org.apache.hadoop.hbase.client.ResultScanner;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.util.Bytes;
+
+public class HBase implements BigTable {
+
+ /**
+ * Logger.
+ */
+ private static final Log LOG = LogFactory.getLog(HBase.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));
+
+ // 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),
+// Bytes.toBytes(key));
+// } 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>();
+
+ // 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();
+ LOG.error(e.toString(), e);
+ }
+ 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);
+ LOG.info("Found row: " + rr);
+ keySet.add(rr.toString());
+ }
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ //e.printStackTrace();
+ LOG.error(e.toString(), e);
+ }
+
+ // 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();
+ LOG.error(e.toString(), e);
+ }
+ }
+
+ @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();
+ }
+}
Added: trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-en_GB.properties
===================================================================
--- trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-en_GB.properties (rev 0)
+++ trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-en_GB.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,32 @@
+Map\ Storage\ Manager=Map Storage Manager
+TABLE\ NAME\ \:\ TODO=
+login\ \:=Login
+mapstoragemanager.action.aboutUs=About us
+mapstoragemanager.action.aboutUs.tip=About Code Lutin
+mapstoragemanager.action.connect=Connect
+mapstoragemanager.action.connect.tip=Start a new connection
+mapstoragemanager.action.disconnect=Disconnect
+mapstoragemanager.action.disconnect.tip=Disconnect the current session
+mapstoragemanager.action.edit=Edit
+mapstoragemanager.action.edit.tip=
+mapstoragemanager.action.exit=Exit
+mapstoragemanager.action.exit.tip=
+mapstoragemanager.action.file=File
+mapstoragemanager.action.file.tip=
+mapstoragemanager.action.fr=French
+mapstoragemanager.action.fr.tip=Change to french language
+mapstoragemanager.action.help=Help
+mapstoragemanager.action.help.tip=
+mapstoragemanager.action.language=Choose language
+mapstoragemanager.action.language.tip=
+mapstoragemanager.action.menuHelp=Help
+mapstoragemanager.action.menuHelp.tip=
+mapstoragemanager.action.preferences=Preferences
+mapstoragemanager.action.preferences.tip=
+mapstoragemanager.action.uk=English
+mapstoragemanager.action.uk.tip=Change to english language
+mapstoragemanager.action.visitSite=Visit our site
+mapstoragemanager.action.visitSite.tip=
+name\ base\ \:=Name base
+ok=Validate
+password\ \:=Password
Added: trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-fr_FR.properties
===================================================================
--- trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-fr_FR.properties (rev 0)
+++ trunk/msm-hbase/src/main/resources/i18n/mapstoragemanager-fr_FR.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,32 @@
+Map\ Storage\ Manager=Map Storage Manager
+TABLE\ NAME\ \:\ TODO=
+login\ \:=Identifiant
+mapstoragemanager.action.aboutUs=A propos
+mapstoragemanager.action.aboutUs.tip=A propos de Code Lutin
+mapstoragemanager.action.connect=Connexion
+mapstoragemanager.action.connect.tip=Etablis une nouvelle connexion
+mapstoragemanager.action.disconnect=D\u00E9connexion
+mapstoragemanager.action.disconnect.tip=D\u00E9connecte la session courante
+mapstoragemanager.action.edit=Edition
+mapstoragemanager.action.edit.tip=
+mapstoragemanager.action.exit=Quitter
+mapstoragemanager.action.exit.tip=Quitte l'application
+mapstoragemanager.action.file=Fichier
+mapstoragemanager.action.file.tip=
+mapstoragemanager.action.fr=Fran\u00E7ais
+mapstoragemanager.action.fr.tip=Changer la langue en fran\u00E7ais
+mapstoragemanager.action.help=Aide
+mapstoragemanager.action.help.tip=
+mapstoragemanager.action.language=choisir la langue
+mapstoragemanager.action.language.tip=
+mapstoragemanager.action.menuHelp=Aide
+mapstoragemanager.action.menuHelp.tip=Aide contextuelle
+mapstoragemanager.action.preferences=Pr\u00E9f\u00E9rences
+mapstoragemanager.action.preferences.tip=Permet de configurer l'application
+mapstoragemanager.action.uk=Anglais
+mapstoragemanager.action.uk.tip=Changer la langue en anglais
+mapstoragemanager.action.visitSite=Visiter notre site
+mapstoragemanager.action.visitSite.tip=
+name\ base\ \:=Nom de la base
+ok=Valider
+password\ \:=Mot de passe
Added: trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-en_GB.properties
===================================================================
--- trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-en_GB.properties (rev 0)
+++ trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-en_GB.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,32 @@
+Map\ Storage\ Manager=
+TABLE\ NAME\ \:\ TODO=
+login\ \:=
+mapstoragemanager.action.aboutUs=
+mapstoragemanager.action.aboutUs.tip=
+mapstoragemanager.action.connect=
+mapstoragemanager.action.connect.tip=
+mapstoragemanager.action.disconnect=
+mapstoragemanager.action.disconnect.tip=
+mapstoragemanager.action.edit=
+mapstoragemanager.action.edit.tip=
+mapstoragemanager.action.exit=
+mapstoragemanager.action.exit.tip=
+mapstoragemanager.action.file=
+mapstoragemanager.action.file.tip=
+mapstoragemanager.action.fr=
+mapstoragemanager.action.fr.tip=
+mapstoragemanager.action.help=
+mapstoragemanager.action.help.tip=
+mapstoragemanager.action.language=
+mapstoragemanager.action.language.tip=
+mapstoragemanager.action.menuHelp=
+mapstoragemanager.action.menuHelp.tip=
+mapstoragemanager.action.preferences=
+mapstoragemanager.action.preferences.tip=
+mapstoragemanager.action.uk=
+mapstoragemanager.action.uk.tip=
+mapstoragemanager.action.visitSite=
+mapstoragemanager.action.visitSite.tip=
+name\ base\ \:=
+ok=
+password\ \:=
Added: trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-fr_FR.properties
===================================================================
--- trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-fr_FR.properties (rev 0)
+++ trunk/msm-hbase/src/main/resources/i18n/mapstoragemanagerarch-fr_FR.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,32 @@
+Map\ Storage\ Manager=
+TABLE\ NAME\ \:\ TODO=
+login\ \:=
+mapstoragemanager.action.aboutUs=
+mapstoragemanager.action.aboutUs.tip=
+mapstoragemanager.action.connect=
+mapstoragemanager.action.connect.tip=
+mapstoragemanager.action.disconnect=
+mapstoragemanager.action.disconnect.tip=
+mapstoragemanager.action.edit=
+mapstoragemanager.action.edit.tip=
+mapstoragemanager.action.exit=
+mapstoragemanager.action.exit.tip=
+mapstoragemanager.action.file=
+mapstoragemanager.action.file.tip=
+mapstoragemanager.action.fr=
+mapstoragemanager.action.fr.tip=
+mapstoragemanager.action.help=
+mapstoragemanager.action.help.tip=
+mapstoragemanager.action.language=
+mapstoragemanager.action.language.tip=
+mapstoragemanager.action.menuHelp=
+mapstoragemanager.action.menuHelp.tip=
+mapstoragemanager.action.preferences=
+mapstoragemanager.action.preferences.tip=
+mapstoragemanager.action.uk=
+mapstoragemanager.action.uk.tip=
+mapstoragemanager.action.visitSite=
+mapstoragemanager.action.visitSite.tip=
+name\ base\ \:=
+ok=
+password\ \:=
Added: trunk/msm-hbase/src/main/resources/log4j.properties
===================================================================
--- trunk/msm-hbase/src/main/resources/log4j.properties (rev 0)
+++ trunk/msm-hbase/src/main/resources/log4j.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,14 @@
+# Global logging configuration
+#log4j.rootLogger=ERROR, stdout, file
+log4j.rootLogger=INFO, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.file=mapstoragemanager.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+
+log4j.logger.org.nuiton=INFO
+log4j.logger.org.nuiton.mapstoragemanager=DEBUG
Added: trunk/msm-hbase/src/site/doc/attachment.sh
===================================================================
--- trunk/msm-hbase/src/site/doc/attachment.sh (rev 0)
+++ trunk/msm-hbase/src/site/doc/attachment.sh 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,64 @@
+#!/bin/bash
+#MIRROR=http://mir2.ovh.net
+HBASE_VERSION=0.20.3
+MIRROR=http://archive.apache.org
+
+HBASE_ARTIFACT=hbase-$HBASE_VERSION
+HBASE_TAR=$HBASE_ARTIFACT.tar.gz
+HBASE_URL=$MIRROR/dist/hadoop/hbase/$HBASE_ARTIFACT/$HBASE_TAR
+
+INSTALL_DIR=/tmp
+HBASE_HOME=$INSTALL_DIR/$HBASE_ARTIFACT
+
+# get hbase tar
+wget -O $INSTALL_DIR/$HBASE_TAR $HBASE_URL
+
+# extract into install dir
+tar xvzf $INSTALL_DIR/$HBASE_TAR -C $INSTALL_DIR
+
+# echo java home to hbase-config.sh
+echo "JAVA_HOME=$JAVA_HOME" >> $HBASE_HOME/bin/hbase-config.sh
+
+# add artifacts to local maven repository
+GROUPID=org.apache.hadoop
+
+# dependencies
+HADOOP_VERSION=0.20.1-hdfs127-core
+ZOOKEEPER_VERSION=3.2.1
+COMMON_CLI_VERSION=2.0-SNAPSHOT
+
+echo mvn install:install-file -DgroupId=$GROUPID -DartifactId=zookeeper -Dversion=$ZOOKEEPER_VERSION -Dpackaging=jar \
+ -Dfile=$HBASE_HOME/lib/zookeeper-$ZOOKEEPER_VERSION.jar
+
+echo mvn install:install-file -DgroupId=$GROUPID -DartifactId=hadoop -Dversion=$HADOOP_VERSION -Dpackaging=jar \
+ -Dfile=$HBASE_HOME/lib/hadoop-$HADOOP_VERSION.jar
+
+echo mvn install:install-file -DgroupId=$GROUPID -DartifactId=hbase -Dversion=$HBASE_VERSION -Dpackaging=jar \
+ -Dfile=$HBASE_HOME/hbase-$HBASE_VERSION.jar
+
+echo mvn install:install-file -DgroupId=commons-cli -DartifactId=commons-cli -Dversion=$COMMON_CLI_VERSION -Dpackaging=jar \
+ -Dfile=$HBASE_HOME/lib/commons-cli-$COMMON_CLI_VERSION.jar
+
+# start hbase
+# $HBASE_HOME/bin/start-hbase.sh
+
+# stop hbase
+# $HBASE_HOME/bin/stop-hbase.sh
+
+
+# HBASE_VERSION=0.20.0:
+# HADOOP_VERSION=0.20.0-plus4681-core
+# ZOOKEEPER_VERSION=r785019-hbase-1329
+# COMMON_CLI_VERSION=2.0-SNAPSHOT
+
+# HBASE_VERSION=0.20.1 ou 0.20.2:
+# HADOOP_VERSION=0.20.1-hdfs127-core
+# ZOOKEEPER_VERSION=3.2.1
+# COMMON_CLI_VERSION=2.0-SNAPSHOT
+
+# HBASE_VERSION=0.20.3:
+# HADOOP_VERSION=0.20.1-hdfs127-core
+# ZOOKEEPER_VERSION=3.2.2
+# COMMON_CLI_VERSION=2.0-SNAPSHOT
+
+
Added: trunk/msm-hbase/src/site/doc/maven_hbase.rst
===================================================================
--- trunk/msm-hbase/src/site/doc/maven_hbase.rst (rev 0)
+++ trunk/msm-hbase/src/site/doc/maven_hbase.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,12 @@
+
+Installation Artifact HBase
+===========================
+
+N'existant pas de repository maven hebergeant les artifacts hbase, il faut les
+installer manuellement.
+
+le script attachment.sh fournis dans ce même dossier permet d'installer ceux-ci.
+
+A noter qu'il peut être intéréssant de modifier la variable INSTALL_DIR...
+
+Merci à Stephane Chorlet pour ce même script.
\ No newline at end of file
Added: trunk/msm-hbase/src/test/resources/log4j.properties
===================================================================
--- trunk/msm-hbase/src/test/resources/log4j.properties (rev 0)
+++ trunk/msm-hbase/src/test/resources/log4j.properties 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,14 @@
+# Global logging configuration
+#log4j.rootLogger=ERROR, stdout, file
+log4j.rootLogger=INFO, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.file=mapstoragemanager.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+
+log4j.logger.org.nuiton=INFO
+log4j.logger.org.nuiton.mapstoragemanager=DEBUG
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-02-09 14:52:00 UTC (rev 66)
+++ trunk/pom.xml 2010-02-10 06:50:08 UTC (rev 67)
@@ -28,6 +28,7 @@
<modules>
<module>mapstoragemanagerarch</module>
<module>msm-bighashmap</module>
+ <module>msm-hbase</module>
</modules>
<!-- ************************************************************* -->
Added: trunk/src/site/doc/bigtable/HowToHbase.rst
===================================================================
--- trunk/src/site/doc/bigtable/HowToHbase.rst (rev 0)
+++ trunk/src/site/doc/bigtable/HowToHbase.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,71 @@
+
+How to Hbase
+============
+
+Préparation de l'environnement de travail
+-----------------------------------------
+
+prérequis : (nous travaillerons sur linux)
+ - SSH doit être installé.
+
+Télécharger Hadoop :
+ftp://ftp.inria.fr/pub/Apache/hadoop/core/hadoop-0.20.1/hadoop-0.20.1.tar.gz
+Télécharger Hbase :
+ftp://ftp.inria.fr/pub/Apache/hadoop/hbase/hbase-0.20.2/hbase-0.20.2.tar.gz
+
+Dézipper les archives...
+
+Variables d'environnement
+-------------------------
+
+Créer deux variables d'environnement "Hadoop_HOME" et "HBase_HOME" localisant les dossiers Hadoop-0.20.1 et HBase-0.20.2.
+Ouvrir les fichiers ${Hadoop_Home}/conf/hadoop-env.sh et ${HBase_Home}/conf/hbase-env.sh et modifier/ajouter la variable d'environnement JAVA_HOME.
+
+Lancement des daemons
+---------------------
+
+Lancement du daemon hadoop :
+${Hadoop_HOME}/bin/start-dfs.sh
+
+Lancement du daemon hbase :
+${HBase_HOME}/bin/start-hbase.sh
+
+Lancement du shell Hbase
+------------------------
+
+${HBase_HOME}/bin/hbase shell
+
+Exemple
+-------
+
+hbase> # Type "help" to see shell help screen
+hbase> help
+hbase> # To create a table named "mylittletable" with a column family of "mylittlecolumnfamily", type
+hbase> create "mylittletable", "mylittlecolumnfamily"
+hbase> # To see the schema for you just created "mylittletable" table and its single "mylittlecolumnfamily", type
+hbase> describe "mylittletable"
+hbase> # To add a row whose id is "x", to the column "mylittlecolumnfamily:x" with a value of 'x', do
+hbase> put "mylittletable", "x"
+hbase> # To get the cell just added, do
+hbase> get "mylittletable", "x"
+hbase> # To scan you new table, do
+hbase> scan "mylittletable"
+
+Arrêt des daemons
+-----------------
+
+Lancement du daemon hadoop :
+${HADOOP_HOME}/bin/stop-dfs.sh
+(On va dire que l'action n'est pas très rapide... Si elle marche.. ?)
+
+Lancement du daemon hbase :
+${HBASE_HOME}/bin/stop-hbase.sh
+${HBASE_HOME}/bin/stop-all.sh
+(??? pour le premier il faut renseigner le nom du node ? Pour le second, je doute fort qu'il éteigne bien le daemon..)
+---> Problème de port à la fac, je suppose.
+
+
+
+
+So It's done
+Now you have to work !
\ No newline at end of file
Added: trunk/src/site/doc/bigtable/analyseBT.rst
===================================================================
--- trunk/src/site/doc/bigtable/analyseBT.rst (rev 0)
+++ trunk/src/site/doc/bigtable/analyseBT.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,92 @@
+Analyse de BigTable (de google Inc.)
+=====================================
+
+But de l'analyse
+----------------
+
+Permettre la compréhension de Big Table et de ses diverses implémentations
+ainsi que l'extraction d'interface pour le projet MSM.
+
+Introduction : Qu'est-ce que BigTable ?
+---------------------------------------
+
+BigTable est la spécification d'un système de stockage distribué permettant
+de gérer des données. Il est conçu pour s'adapter fiablement à des tailles
+de contenu allant jusqu'au "Peta". BigTable est utilisé pour plusieurs raisons :
+
+- Toucher un large ensemble d'applications
+- Mise à l'échelle
+- Très bonnes performances (temps de réponse...)
+- Forte disponibilité
+
+Le modèle de données de BigTable
+--------------------------------
+
+Le modèle de données de BigTable se comporte comme un dictionnaire
+multidimensionnel (matrice) indexé par le triplet
+<row key, column key, timestamp>. Chaque valeur de ce dictionnaire
+est un table d'octets.
+
+Les clés pour une rangée du dictionnaire sont des chaînes de charactères
+arbitraires et BigTable maintient les données dans un ordre lexicographique
+grâce à ce type de clé.
+
+ex de clé de rangée : "com.google.maps/index.html" (reversed URL)
+
+La portée d'une rangée est appelée "tablet", unité de distribution et d'équilibrage
+de charge.
+
+Les clés de colonne sont groupées en ensembles appelés "famille de colonnes".
+Une clé de colonne est nommé suivant le schéma : family:qualifier.
+Les noms de famille doivent être lisibles facilement mais les qualificateurs peuvent
+être des chaînes de charactères arbitraires
+
+ex de famille de colonne : "contents:"
+
+Ainsi, le contenu d'une cellule indexée par <com.google.maps/index.html, contents:, ?>
+serait le contenu de la page "index.html" (le code html).
+Une cellule peut contenir plusieurs versions de la même donnée via le mécanisme de timestamp.
+Chaque cellule stocke plusieurs timestamp en ordre décroissant si bien que :
+
+- <com.google.maps/index.html, contents:, ts1> donne la version la plus récente du contenu.
+- <com.google.maps/index.html, contents:, ts2> donne une version plus ancienne du contenu.
+
+Stockage
+--------
+
+BigTable utilise le système de fichier google GFS (Google File System)
+pour stocker les logs et fichiers de données.
+
+Le format de fichier google SSTable est utilisé pour stocker les données
+internes à BigTable.
+
+API BigTable (client)
+---------------------
+
+Voici les fonctionnalités prévues par la spécification BigTable :
+
+- Création de tables.
+- Création de familles de colonne.
+- Suppression de tables.
+- Suppression de familles de colonne.
+- Changement de cluster (?).
+- Changement de table.
+- Changement de méta données sur une famille de colonne (droits d'accès...).
+- Ecriture des données dans une table.
+- Suppression des données dans une table.
+- Recherche des données dans une table depuis des rangées individuelles.
+- Itération sur un sous-ensemble de données d'une table.
+- Manipulation avancée des données : Transactions "Lecture - Modification - Ecriture"
+sur une rangée simple (BigTable ne supporte pas les transactions par rangées multiples).
+- Utilisation des cellules comme compteurs d'entier.
+- Excécution de scripts clients dans l'espace d'adressage des serveurs (langage : sawzall).
+- Calcul parallèle avec le framework MapReduce.
+
+Source
+------
+
+Cette analyse est une synthèse des éléments utiles dans le cadre du projet, issue de la
+spécification même de Google Inc.
+"BigTable: A Distributed Storage System for Structured Data"
+
+lien : labs.google.com/papers/bigtable-osdi06.pdf
Added: trunk/src/site/doc/bigtable/bigTable.pdf
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/doc/bigtable/bigTable.pdf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/doc/bigtable/hbase-files.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/site/doc/bigtable/hbase-files.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/site/doc/bigtable/projetHBase.rst
===================================================================
--- trunk/src/site/doc/bigtable/projetHBase.rst (rev 0)
+++ trunk/src/site/doc/bigtable/projetHBase.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,40 @@
+// mardi 12 janvier 2010
+
+Technologies
+------------
+
+ - UML
+ - JAVA
+ - JMX
+ - Jaxx / Swing
+ - HBase
+ - XML
+ - SVN
+ - RST
+ - Maven
+
+Contraintes
+------------
+
+- L'encodage des fichiers doit être en UTF-8.
+- La norme checkstyle de sun doit être utilisée pour le code java (http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html)
+- Pour les diagrammes UML, l'outil ArgoUML (v 0.28.1) doit être employé.
+- Utilisation de Maven2 pour la construction, génération du site web…
+- Couverture du code à 80%
+- Environnement de développement libre (Eclipse, Netbeans, Vim)
+- Utilisation de rst (ReStructuredText) pour la documentation
+- Projet sous licence GPL v3
+- Code source en anglais
+
+Définitions
+-----------
+
+HBase
+
+HMap
+
+RST
+
+
+
+
Added: trunk/src/site/reports/week3.rst
===================================================================
--- trunk/src/site/reports/week3.rst (rev 0)
+++ trunk/src/site/reports/week3.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,23 @@
+
+ This week
+ ==========
+ - Test jaxx with ant (examples of jaxx)
+ - Creation of a user interface (the beginning) with many tests of css, java and jaxx files.
+ - Installation and test of HBase, Hadoop
+ - Creation of the core of the plugin architecture
+ - Documentation about BigTable
+
+
+
+ Next week
+ =========
+ - Upgrade ui with jaxx.
+ - Test dynamic method into jaxx.
+
+
+
+
+
+
+
+
Added: trunk/src/site/reports/week4.rst
===================================================================
--- trunk/src/site/reports/week4.rst (rev 0)
+++ trunk/src/site/reports/week4.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,11 @@
+
+ This week
+ ==========
+ - Creation of a new interface BigTable.
+ - Developpment of the plugin BigHashMap, an implementation of the BigTable specification with HashMap.
+ - Upgrade of the ui with jaxx.
+ - Meeting with Code Lutin about jaxx.
+
+
+ Next week
+ =========
Added: trunk/src/site/reports/week5.rst
===================================================================
--- trunk/src/site/reports/week5.rst (rev 0)
+++ trunk/src/site/reports/week5.rst 2010-02-10 06:50:08 UTC (rev 67)
@@ -0,0 +1,16 @@
+
+ This week
+ ==========
+ - Meeting with Benjamin Poussin.
+ - we note differents problems with the plugins BigHashMap :
+ - hashcode..
+ - equals..
+
+
+ Next week
+ =========
+ - we must separate the project into subprojects maven modular :
+ - one sub-project for the MSM's architecture
+ - one sub-project for each plugin.
+ - one project which contain all subproject.
+ link : http://matthieu-lux.developpez.com/tutoriels/java/maven/?page=modules
\ No newline at end of file
1
0
Author: fgilet
Date: 2010-02-09 15:52:00 +0100 (Tue, 09 Feb 2010)
New Revision: 66
Added:
tags/mapstoragemanager-v001/
tags/mapstoragemanager-v001/LICENSE.txt
tags/mapstoragemanager-v001/README.txt
tags/mapstoragemanager-v001/changelog.txt
tags/mapstoragemanager-v001/pom.xml
tags/mapstoragemanager-v001/src/
Removed:
tag/
Log:
deplacement du projet mapstoragemanager version 1 du dossier "tag" dans le dossier "tags" avec num?\195?\169ro de version
Copied: tags/mapstoragemanager-v001/LICENSE.txt (from rev 65, tag/LICENSE.txt)
===================================================================
--- tags/mapstoragemanager-v001/LICENSE.txt (rev 0)
+++ tags/mapstoragemanager-v001/LICENSE.txt 2010-02-09 14:52:00 UTC (rev 66)
@@ -0,0 +1,166 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
Copied: tags/mapstoragemanager-v001/changelog.txt (from rev 65, tag/changelog.txt)
===================================================================
--- tags/mapstoragemanager-v001/changelog.txt (rev 0)
+++ tags/mapstoragemanager-v001/changelog.txt 2010-02-09 14:52:00 UTC (rev 66)
@@ -0,0 +1,2 @@
+Changelog is not any longer maintained, please refer to the release note :
+ http://maven-site.nuiton.org/mapstoragemanager/changes-report.html
Copied: tags/mapstoragemanager-v001/pom.xml (from rev 65, tag/pom.xml)
===================================================================
--- tags/mapstoragemanager-v001/pom.xml (rev 0)
+++ tags/mapstoragemanager-v001/pom.xml 2010-02-09 14:52:00 UTC (rev 66)
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <!-- repository containing the parent pom. -->
+ <repositories>
+ <repository>
+ <id>org.nuiton</id>
+ <url>http://maven.nuiton.org/release/</url>
+ </repository>
+ </repositories>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+ <parent>
+ <groupId>org.nuiton</groupId>
+ <artifactId>mavenpom4redmine</artifactId>
+ <version>2.0.4</version>
+ </parent>
+
+ <version>0.1-SNAPSHOT</version>
+ <artifactId>mapstoragemanager</artifactId>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${lutinutil.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+
+ <!--Jaxx-->
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-runtime</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.jaxx</groupId>
+ <artifactId>jaxx-widgets</artifactId>
+ <version>${jaxx.version}</version>
+ </dependency>
+ <!-- JUnit for tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>MapStorageManager</name>
+
+ <description>Creation of a graphic user interface for Hbase </description>
+ <inceptionYear>2010</inceptionYear>
+
+ <developers>
+ <developer>
+ <id>tchemit</id>
+ <name>Tony Chemit</name>
+ <email>chemit(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>fdesbois</id>
+ <name>Florian Desbois</name>
+ <email>fdesbois(a)codelutin.com</email>
+ <organization>CodeLutin</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>fgilet</id>
+ <name>Florent Gilet</name>
+ <email>florent.gilet(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>gcrieloue</id>
+ <name>Gilles Crieloue</name>
+ <email>gilles.crieloue(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>afages</id>
+ <name>Amaury Fages</name>
+ <email>amaury.fages(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>dlanglais</id>
+ <name>Dorian langlais</name>
+ <email>dorain.langlais(a)etu.univ-nantes.fr</email>
+ <organization>Université de nantes</organization>
+ <timezone>+2</timezone>
+ <roles>
+ <role>Développeur</role>
+ </roles>
+ </developer>
+ </developers>
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+ <packaging>jar</packaging>
+
+ <properties>
+
+ <!-- main class in jar -->
+ <maven.jar.main.class>org.nuiton.mapstoragemanager.Main</maven.jar.main.class>
+
+ <jaxx.version>2.0.0-beta-3</jaxx.version>
+ <lutinutil.version>1.1.2</lutinutil.version>
+ <i18n.version>1.0.1</i18n.version>
+
+ <!-- jaxx -->
+ <jaxx.useUIManagerForIcon>true</jaxx.useUIManagerForIcon>
+ <jaxx.addProjectClassPath>true</jaxx.addProjectClassPath>
+ <jaxx.addSourcesToClassPath>true</jaxx.addSourcesToClassPath>
+ </properties>
+
+ <build>
+ <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.nuiton.jaxx</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <version>${jaxx.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>${i18n.version}</version>
+ <configuration>
+ <!--silent>true</silent-->
+ <entries>
+ <entry>
+ <basedir>${maven.gen.dir}/java/</basedir>
+ </entry>
+ </entries>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-deps</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <silent>true</silent>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>maven-license-plugin</artifactId>
+ <configuration>
+ <copyToMETA_INF>true</copyToMETA_INF>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>./lib/</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- plugin site -->
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>doxia-module-jrst</artifactId>
+ <version>${jrst.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
1
0
r65 - trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core
by dlanglais@users.nuiton.org 08 Feb '10
by dlanglais@users.nuiton.org 08 Feb '10
08 Feb '10
Author: dlanglais
Date: 2010-02-08 17:34:29 +0100 (Mon, 08 Feb 2010)
New Revision: 65
Modified:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java
Log:
Tentative de diminution de la complexit?\195?\169 cyclomatique de la fonction PluginLoader().
Generally 1-4 is considered good, 5-7 ok, 8-10 consider re-factoring, and 11+ re-factor now !
12 -> So I've re-factored it NOW !!
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-08 14:32:24 UTC (rev 64)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-08 16:34:29 UTC (rev 65)
@@ -48,18 +48,71 @@
}
// adds all the directory jars to the ClassLoader
+// for (File file : directory.listFiles()) {
+// if (file.getAbsolutePath().endsWith(".jar")) {
+// try {
+// this.addURL(file.toURI().toURL());
+// } catch (MalformedURLException e) {
+// //e.printStackTrace();
+// LOG.error(e.toString(), e);
+// }
+// }
+// }
+ this.addDirectoryJarsToClassLoader(directory);
+
+
+// File libs = new File("plugins/libs");
+// if (!libs.exists()) {
+// throw new Exception("No directory " + libs.getAbsolutePath());
+// }
+//
+// // adds all the libs jars to the ClassLoader
+// for (File file : libs.listFiles()) {
+// if (file.getAbsolutePath().endsWith(".jar")) {
+// try {
+// LOG.info("== LIB " + file.getAbsolutePath() + "...");
+// this.addURL(file.toURI().toURL());
+// } catch (MalformedURLException e) {
+// //e.printStackTrace();
+// LOG.error(e.toString(), e);
+// }
+// }
+// }
+ this.addLibsJarsToClassLoader();
+
+ // loads the jars classes
for (File file : directory.listFiles()) {
if (file.getAbsolutePath().endsWith(".jar")) {
+ LOG.info("== JAR " + file.getAbsolutePath() + "...");
+ loadJarClasses(file.getAbsolutePath());
+ }
+ }
+ }
+
+ /**
+ * Add directory jars to ClassLoader.
+ * adds all the directory jars to the ClassLoader.
+ * @param directory directory
+ */
+ private void addDirectoryJarsToClassLoader(File directory) {
+ for (File file : directory.listFiles()) {
+ if (file.getAbsolutePath().endsWith(".jar")) {
try {
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- //e.printStackTrace();
LOG.error(e.toString(), e);
}
}
}
+ }
+ /**
+ * Add libs jars to ClassLoader.
+ * Adds all the libs jars to the ClassLoader.
+ */
+ private void addLibsJarsToClassLoader() throws Exception {
+
File libs = new File("plugins/libs");
if (!libs.exists()) {
throw new Exception("No directory " + libs.getAbsolutePath());
@@ -72,19 +125,10 @@
LOG.info("== LIB " + file.getAbsolutePath() + "...");
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- //e.printStackTrace();
LOG.error(e.toString(), e);
}
}
}
-
- // loads the jars classes
- for (File file : directory.listFiles()) {
- if (file.getAbsolutePath().endsWith(".jar")) {
- LOG.info("== JAR " + file.getAbsolutePath() + "...");
- loadJarClasses(file.getAbsolutePath());
- }
- }
}
/**
1
0
08 Feb '10
Author: dlanglais
Date: 2010-02-08 15:32:24 +0100 (Mon, 08 Feb 2010)
New Revision: 64
Modified:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/Main.java
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java
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/ui/gui/ApplicationEngine.java
trunk/msm-bighashmap/pom.xml
trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java
Log:
Am?\195?\169lioration Usability.
Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/Main.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/Main.java 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/Main.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -16,9 +16,8 @@
* $Author: tchemit $
*/
public class Main {
-
- public static void main(String... args) {
-
+
+ public Main(){
I18n.setUniqueBundleName("mapstoragemanager-i18n");
I18n.init(Locale.FRANCE);
final MainUI ui = new MainUI();
@@ -32,6 +31,10 @@
}
});
}
+
+ public static void main(String... args) {
+ new Main();
+ }
}
Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -19,7 +19,7 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(BigTableLoader.class);
+ private static final Log LOG = LogFactory.getLog(BigTableLoader.class);
/**
* The BigTable Set Loader.
@@ -43,7 +43,7 @@
try {
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- log.error(e);
+ LOG.error(e.toString(),e);
}
}
}
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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -23,7 +23,7 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(Core.class);
+ private static final Log LOG = LogFactory.getLog(Core.class);
/**
* A map "name of the plugin" - "plugin instance".
@@ -48,13 +48,13 @@
this.getClass().getClassLoader());
} catch (Exception e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
try {
loadAvailableBases();
} catch (IOException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
}
@@ -76,10 +76,10 @@
(BigTable) tmpClass.newInstance());
} catch (InstantiationException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
} catch (IllegalAccessException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
}
}
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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -9,7 +9,7 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(MainTestCore.class);
+ private static final Log LOG = LogFactory.getLog(MainTestCore.class);
/**
* test for plugins loading and basic functions.
@@ -19,16 +19,16 @@
Core core = new Core();
- log.info("Plugins disponibles");
+ LOG.info("Plugins disponibles");
for (String base : core.listPlugins()) {
- log.info("* " + base);
+ LOG.info("* " + base);
}
/* Test du plugins */
for (BigTable bigTable : core.getAvailableBases()) {
bigTable.put("clé", "valeur");
- log.info(bigTable.get("clé"));
+ LOG.info(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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -24,7 +24,7 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(PluginLoader.class);
+ private static final Log LOG = LogFactory.getLog(PluginLoader.class);
/**
* The plugin classes.
@@ -54,7 +54,7 @@
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
}
}
@@ -69,11 +69,11 @@
for (File file : libs.listFiles()) {
if (file.getAbsolutePath().endsWith(".jar")) {
try {
- log.info("== LIB " + file.getAbsolutePath() + "...");
+ LOG.info("== LIB " + file.getAbsolutePath() + "...");
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
}
}
@@ -81,7 +81,7 @@
// loads the jars classes
for (File file : directory.listFiles()) {
if (file.getAbsolutePath().endsWith(".jar")) {
- log.info("== JAR " + file.getAbsolutePath() + "...");
+ LOG.info("== JAR " + file.getAbsolutePath() + "...");
loadJarClasses(file.getAbsolutePath());
}
}
@@ -96,14 +96,14 @@
private void loadJarClasses(final String jarPath) {
File file = new File(jarPath);
- log.info("Loading " + jarPath + "...");
+ LOG.info("Loading " + jarPath + "...");
JarFile jar = null;
try {
jar = new JarFile(file.getAbsolutePath());
} catch (IOException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
// Enumeration < JarEntry > entries2 = jar.entries();
@@ -133,7 +133,7 @@
String extension = ".class";
if (fileName.endsWith(extension)) {
- log.info("Loading " + fileName + "...");
+ LOG.info("Loading " + fileName + "...");
// formating file name
fileName = fileName.substring(0, fileName.length()
@@ -145,7 +145,7 @@
tmpClass = this.loadClass(fileName);
//Class.forName(fileName, true, this);
} catch (ClassNotFoundException e) {
- log.error(e);
+ LOG.error(e.toString(),e);
}
classes.add(tmpClass);
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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -14,17 +14,17 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(TestServiceLoader.class);
+ private static final Log LOG = LogFactory.getLog(TestServiceLoader.class);
public TestServiceLoader() {
try {
BigTableLoader p =
new BigTableLoader("plugins", this.getClass().getClassLoader());
- log.info(p.getBigTable());
+ LOG.info(p.getBigTable());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
- log.error(e);
+ LOG.error(e.toString(),e);
}
}
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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -20,7 +20,7 @@
/**
* Logger.
*/
- private static final Log log = LogFactory.getLog(HBase.class);
+ private static final Log LOG = LogFactory.getLog(HBase.class);
private HBaseConfiguration config;
private HTable table;
@@ -35,7 +35,7 @@
// be found on the CLASSPATH
org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
config = new HBaseConfiguration(conf);
- log.info("test");
+ LOG.info("test");
selectTable(tableName);
put("test", "val");
put("test", "val2");
@@ -87,13 +87,13 @@
Get g = new Get(Bytes.toBytes(rowName));
Result r;
byte[] value = null;
-// try {
-// r = table.get(g);
-// value = r.getValue(Bytes.toBytes(familyName),
-// Bytes.toBytes(key));
-// } catch (IOException e) {
-// e.printStackTrace();
-// }
+// try {
+// r = table.get(g);
+// value = r.getValue(Bytes.toBytes(familyName),
+// Bytes.toBytes(key));
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
// If we convert the value bytes, we should get back 'Some Value', the
// value we inserted at this location.
@@ -120,7 +120,7 @@
} catch (IOException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
try {
// Scanners return Result instances.
@@ -128,14 +128,15 @@
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);
+ //System.out.println("Found row: " + rr);
+ LOG.info("Found row: " + rr);
keySet.add(rr.toString());
}
} catch (IOException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
// The other approach is to use a foreach loop. Scanners are iterable!
@@ -158,7 +159,7 @@
table = new HTable(config, tableName);
} catch (IOException e) {
//e.printStackTrace();
- log.error(e.toString(), e);
+ LOG.error(e.toString(), e);
}
}
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-08 02:47:16 UTC (rev 63)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/ui/gui/ApplicationEngine.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -3,6 +3,8 @@
import java.util.Locale;
import java.util.ResourceBundle;
import javax.swing.JOptionPane;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* Engine Class with methods for application user interface.
@@ -11,6 +13,11 @@
*/
public class ApplicationEngine {
+ /**
+ * Logger.
+ */
+ private static final Log LOG = LogFactory.getLog(ApplicationEngine.class);
+
Locale currentLocale;
ResourceBundle messages;
@@ -42,7 +49,6 @@
public void setLocale(String language, String country) {
currentLocale= new Locale(language,country);
messages = ResourceBundle.getBundle("mapstoragemanager",currentLocale);
- System.out.println(messages.getString("ok"));
-
+ LOG.info(messages.getString("ok"));
}
}
Modified: trunk/msm-bighashmap/pom.xml
===================================================================
--- trunk/msm-bighashmap/pom.xml 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/msm-bighashmap/pom.xml 2010-02-08 14:32:24 UTC (rev 64)
@@ -144,7 +144,7 @@
<properties>
- <!-- main class in jar
+ <!-- main class in jar
<maven.jar.main.class>org.nuiton.mapstoragemanager.Main</maven.jar.main.class>-->
<jaxx.version>2.0.0-beta-3</jaxx.version>
<lutinutil.version>1.1.2</lutinutil.version>
@@ -259,3 +259,4 @@
</project>
+
Modified: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java
===================================================================
--- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -21,14 +21,16 @@
* currentTable.
* the table which is selected.
*/
- private Table currentTable;
+ // Not used
+ //private Table currentTable;
/**
* Default constructor.
*/
public BigHashMap() {
this.tables = new HashMap<String, Table>();
- currentTable = null;
+ // Not used
+ //currentTable = null;
}
/**
@@ -45,7 +47,8 @@
* {@inheritDoc}
*/
public void selectTable(String table) {
- this.currentTable = tables.get(table);
+ // Not used
+ //this.currentTable = tables.get(table);
}
/**
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -3,7 +3,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.nuiton.mapstoragemanager.plugins.bighashmap.Cell;
import java.util.NoSuchElementException;
import junit.framework.Assert;
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java 2010-02-08 02:47:16 UTC (rev 63)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java 2010-02-08 14:32:24 UTC (rev 64)
@@ -1,13 +1,10 @@
package org.nuiton.mapstoragemanager.plugins.bighashmap;
-import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
1
0
r63 - in trunk: mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap
by dlanglais@users.nuiton.org 08 Feb '10
by dlanglais@users.nuiton.org 08 Feb '10
08 Feb '10
Author: dlanglais
Date: 2010-02-08 03:47:16 +0100 (Mon, 08 Feb 2010)
New Revision: 63
Added:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/NewBigTable.java
Removed:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java
Modified:
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/plugins/HBase.java
trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java
Log:
Am?\195?\169lioration code...
log au lieu de e.printStackTrace() -> oubli de certains..
remplacement des log.error(e) par log.error(e,e)..
Renommage nvBigTable en NewBigTable (convention de nommage de classe...).
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 18:59:13 UTC (rev 62)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/Core.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -7,18 +7,25 @@
import java.util.List;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.nuiton.mapstoragemanager.plugins.BigTable;
/**
* Class Core.
* This class permit to manage plugins.
- * @author E054030D
+ * @author Gilles Crieloue
*
*/
public class Core {
/**
+ * Logger.
+ */
+ private static final Log log = LogFactory.getLog(Core.class);
+
+ /**
* A map "name of the plugin" - "plugin instance".
*/
private Map < String, BigTable > bases =
@@ -39,13 +46,15 @@
pluginLoader = new PluginLoader(
new URL[]{directory.toURI().toURL()},
this.getClass().getClassLoader());
- } catch (Exception e1) {
- e1.printStackTrace();
+ } catch (Exception e) {
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
try {
loadAvailableBases();
} catch (IOException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
}
@@ -66,9 +75,11 @@
bases.put(tmpClass.getName(),
(BigTable) tmpClass.newInstance());
} catch (InstantiationException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
} catch (IllegalAccessException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
}
}
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 18:59:13 UTC (rev 62)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -6,6 +6,9 @@
public class MainTestCore {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(MainTestCore.class);
/**
@@ -29,5 +32,4 @@
}
}
-
}
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 18:59:13 UTC (rev 62)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -53,8 +53,8 @@
try {
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- e.printStackTrace();
- log.error(e);
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
}
}
@@ -72,7 +72,8 @@
log.info("== LIB " + file.getAbsolutePath() + "...");
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
}
}
@@ -101,7 +102,8 @@
try {
jar = new JarFile(file.getAbsolutePath());
} catch (IOException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
// Enumeration < JarEntry > entries2 = jar.entries();
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 18:59:13 UTC (rev 62)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -2,6 +2,8 @@
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.nuiton.mapstoragemanager.plugins.BigTable;
import org.apache.hadoop.hbase.HBaseConfiguration;
@@ -15,6 +17,11 @@
public class HBase implements BigTable {
+ /**
+ * Logger.
+ */
+ private static final Log log = LogFactory.getLog(HBase.class);
+
private HBaseConfiguration config;
private HTable table;
private String familyName = "mylittlecolumnfamily";
@@ -28,7 +35,7 @@
// 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");
+ log.info("test");
selectTable(tableName);
put("test", "val");
put("test", "val2");
@@ -112,7 +119,8 @@
scanner = table.getScanner(s);
} catch (IOException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
try {
// Scanners return Result instances.
@@ -126,7 +134,8 @@
} catch (IOException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
// The other approach is to use a foreach loop. Scanners are iterable!
@@ -148,7 +157,8 @@
try {
table = new HTable(config, tableName);
} catch (IOException e) {
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e.toString(), e);
}
}
Added: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/NewBigTable.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/NewBigTable.java (rev 0)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/NewBigTable.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -0,0 +1,131 @@
+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 NewBigTable {
+
+ /**
+ * 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/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java 2010-02-07 18:59:13 UTC (rev 62)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/nvBigTable.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -1,131 +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 nvBigTable {
-
- /**
- * 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);
-}
Modified: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java
===================================================================
--- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java 2010-02-07 18:59:13 UTC (rev 62)
+++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/BigHashMap.java 2010-02-08 02:47:16 UTC (rev 63)
@@ -3,14 +3,14 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import org.nuiton.mapstoragemanager.plugins.nvBigTable;
+import org.nuiton.mapstoragemanager.plugins.NewBigTable;
/**
* Interface listant les méthodes nécéssaires sur une base de données.
* @author Dorian Langlais
*
*/
-public class BigHashMap implements nvBigTable {
+public class BigHashMap implements NewBigTable {
/**
* tables.
1
0
r62 - trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins
by dlanglais@users.nuiton.org 07 Feb '10
by dlanglais@users.nuiton.org 07 Feb '10
07 Feb '10
Author: dlanglais
Date: 2010-02-07 19:59:13 +0100 (Sun, 07 Feb 2010)
New Revision: 62
Modified:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java
Log:
Suppression import inutilis?\195?\169 (j'ai vraiment l'impression d'avoir d?\195?\169j?\195?\160 fait ?\195?\167a hier soir.. j'ai du omettre un commit).
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 17:58:57 UTC (rev 61)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/HBase.java 2010-02-07 18:59:13 UTC (rev 62)
@@ -1,6 +1,5 @@
import java.io.IOException;
-import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.nuiton.mapstoragemanager.plugins.BigTable;
1
0
r61 - in trunk: mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap
by dlanglais@users.nuiton.org 07 Feb '10
by dlanglais@users.nuiton.org 07 Feb '10
07 Feb '10
Author: dlanglais
Date: 2010-02-07 18:58:57 +0100 (Sun, 07 Feb 2010)
New Revision: 61
Modified:
trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.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/OurHashMap.java
trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnImpl.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowTest.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/StructureTest.java
trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableTest.java
Log:
Am?\195?\169lioration qualit?\195?\169 de code.
Utilisation de Log au lieu de system.out.println() ou e.printStackTrace().
Suppression de tabulation.
Modified: trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java
===================================================================
--- trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/BigTableLoader.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -5,6 +5,8 @@
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ServiceLoader;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.nuiton.mapstoragemanager.plugins.BigTable;
@@ -15,6 +17,11 @@
public class BigTableLoader extends URLClassLoader {
/**
+ * Logger.
+ */
+ private static final Log log = LogFactory.getLog(BigTableLoader.class);
+
+ /**
* The BigTable Set Loader.
*/
private ServiceLoader<BigTable> bigTableSetLoader;
@@ -36,7 +43,7 @@
try {
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
- e.printStackTrace();
+ log.error(e);
}
}
}
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 12:01:09 UTC (rev 60)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/MainTestCore.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -1,9 +1,13 @@
package org.nuiton.mapstoragemanager.core;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
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
@@ -12,16 +16,16 @@
Core core = new Core();
- System.out.println("Plugins disponibles");
+ log.info("Plugins disponibles");
for (String base : core.listPlugins()) {
- System.out.println("* " + base);
+ log.info("* " + base);
}
/* Test du plugins */
for (BigTable bigTable : core.getAvailableBases()) {
bigTable.put("clé", "valeur");
- System.out.println(bigTable.get("clé"));
+ log.info(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 12:01:09 UTC (rev 60)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/PluginLoader.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -11,7 +11,8 @@
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import java.util.logging.Logger;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* This class loads the plugins.
@@ -21,9 +22,9 @@
public class PluginLoader extends URLClassLoader {
/**
- * A logger.
+ * Logger.
*/
- private Logger logger = Logger.getLogger(this.getClass().getName());
+ private static final Log log = LogFactory.getLog(PluginLoader.class);
/**
* The plugin classes.
@@ -53,6 +54,7 @@
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
+ log.error(e);
}
}
}
@@ -67,7 +69,7 @@
for (File file : libs.listFiles()) {
if (file.getAbsolutePath().endsWith(".jar")) {
try {
- logger.info("== LIB " + file.getAbsolutePath() + "...");
+ log.info("== LIB " + file.getAbsolutePath() + "...");
this.addURL(file.toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
@@ -78,7 +80,7 @@
// loads the jars classes
for (File file : directory.listFiles()) {
if (file.getAbsolutePath().endsWith(".jar")) {
- logger.info("== JAR " + file.getAbsolutePath() + "...");
+ log.info("== JAR " + file.getAbsolutePath() + "...");
loadJarClasses(file.getAbsolutePath());
}
}
@@ -93,7 +95,7 @@
private void loadJarClasses(final String jarPath) {
File file = new File(jarPath);
- logger.info("Loading " + jarPath + "...");
+ log.info("Loading " + jarPath + "...");
JarFile jar = null;
try {
@@ -129,7 +131,7 @@
String extension = ".class";
if (fileName.endsWith(extension)) {
- logger.info("Loading " + fileName + "...");
+ log.info("Loading " + fileName + "...");
// formating file name
fileName = fileName.substring(0, fileName.length()
@@ -141,7 +143,7 @@
tmpClass = this.loadClass(fileName);
//Class.forName(fileName, true, this);
} catch (ClassNotFoundException e) {
- e.printStackTrace();
+ log.error(e);
}
classes.add(tmpClass);
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 12:01:09 UTC (rev 60)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/core/TestServiceLoader.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -1,6 +1,8 @@
package org.nuiton.mapstoragemanager.core;
import java.net.MalformedURLException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* @author fdesbois
@@ -9,20 +11,25 @@
@Deprecated
public class TestServiceLoader {
+ /**
+ * Logger.
+ */
+ private static final Log log = LogFactory.getLog(TestServiceLoader.class);
+
public TestServiceLoader() {
try {
BigTableLoader p =
- new BigTableLoader("plugins",
- this.getClass().getClassLoader());
- System.out.println(p.getBigTable());
+ new BigTableLoader("plugins", this.getClass().getClassLoader());
+ log.info(p.getBigTable());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ //e.printStackTrace();
+ log.error(e);
}
}
public static void main(final String[] args) {
- TestServiceLoader t = new TestServiceLoader();
+ new TestServiceLoader();
}
}
\ No newline at end of file
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 12:01:09 UTC (rev 60)
+++ trunk/mapstoragemanagerarch/src/main/java/org/nuiton/mapstoragemanager/plugins/OurHashMap.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -4,31 +4,28 @@
import java.util.Map;
import java.util.Set;
-public class OurHashMap implements BigTable{
+public class OurHashMap implements BigTable {
- private Map<String,String> map = new HashMap<String, String>();
-
- public String get(String key) {
- return map.get(key);
- }
+ private Map<String, String> map = new HashMap<String, String>();
- public Set<String> getKeys() {
- return map.keySet();
- }
+ public String get(String key) {
+ return map.get(key);
+ }
- public void put(String key, String value) {
- map.put(key, value);
- }
+ public Set<String> getKeys() {
+ return map.keySet();
+ }
- public void connect(String host, String base, String username,
- String password) {
- // TODO Auto-generated method stub
-
- }
+ public void put(String key, String value) {
+ map.put(key, value);
+ }
- public void selectTable(String table) {
- // 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
+ }
}
Modified: trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnImpl.java
===================================================================
--- trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnImpl.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/main/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnImpl.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -47,9 +47,9 @@
* {@inheritDoc}
*/
public final void put(final String key, final Object content) {
- try {
+ if(this.column.keySet().contains(key)) {
this.column.get(key).put((T)content);
- } catch (NullPointerException e) {
+ } else {
this.column.put(key, new CellImpl<T>((T)content));
}
}
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/CellTest.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -17,7 +17,11 @@
*/
public final class CellTest extends TestCase {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(CellTest.class);
+
private Cell<Object> cellActual;
private Cell<Object> cell2Actual;
private Object objectExcepted;
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/ColumnTest.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -17,7 +17,11 @@
public final class ColumnTest extends TestCase {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(ColumnTest.class);
+
private Column columnActual;
private Column column2Actual;
private Object expected;
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowTest.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/RowTest.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -8,7 +8,11 @@
public class RowTest extends TestCase {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(RowTest.class);
+
private Structure structureExpected;
private Map<String, Object> contentExpected;
private Row rowActual;
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/StructureTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/StructureTest.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/StructureTest.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -14,7 +14,11 @@
public class StructureTest extends TestCase {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(StructureTest.class);
+
private Structure structureActual;
private Map<String, Class<?>> structureContentActual;
private Map<String, Class<?>> structureContentExpected;
Modified: trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableTest.java
===================================================================
--- trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableTest.java 2010-02-07 12:01:09 UTC (rev 60)
+++ trunk/msm-bighashmap/src/test/java/org/nuiton/mapstoragemanager/plugins/bighashmap/TableTest.java 2010-02-07 17:58:57 UTC (rev 61)
@@ -23,6 +23,9 @@
*/
public class TableTest extends TestCase {
+ /**
+ * Logger.
+ */
private static final Log log = LogFactory.getLog(TableTest.class);
private Table tableActual;
1
0