hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r551725 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/HClient.java src/java/org/apache/hadoop/hbase/package.html
Date Thu, 28 Jun 2007 22:29:11 GMT
Author: stack
Date: Thu Jun 28 15:29:07 2007
New Revision: 551725

URL: http://svn.apache.org/viewvc?view=rev&rev=551725
Log:
HADOOP-1543 [base] Add HClient.tableExists
M    src/java/org/apache/hadoop/hbase/HClient.java
    (tableExists): Added
M    CHANGES.txt
M    src/java/org/apache/hadoop/hbase/package.html
    Fix javadoc.

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?view=diff&rev=551725&r1=551724&r2=551725
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Thu Jun 28 15:29:07 2007
@@ -42,4 +42,4 @@
  24. HADOOP-1534. [hbase] Memcache scanner fails if start key not present
  25. HADOOP-1537. Catch exceptions in testCleanRegionServerExit so we can see
      what is failing.
-
+ 26. HADOOP-1543 [hbase] Add HClient.tableExists

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java?view=diff&rev=551725&r1=551724&r2=551725
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/HClient.java Thu
Jun 28 15:29:07 2007
@@ -125,6 +125,23 @@
     this.currentServer = null;
     this.rand = new Random();
   }
+
+  /**
+   * @param tableName Table to check.
+   * @return True if table exists already.
+   * @throws IOException
+   */
+  public boolean tableExists(final Text tableName) throws IOException {
+    HTableDescriptor [] tables = listTables();
+    boolean result = false;
+    for (int i = 0; i < tables.length; i++) {
+      if (tables[i].getName().equals(tableName)) {
+        result = true;
+        break;
+      }
+    }
+    return result;
+  }
   
   protected void handleRemoteException(RemoteException e) throws IOException {
     String msg = e.getMessage();

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html?view=diff&rev=551725&r1=551724&r2=551725
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/package.html Thu
Jun 28 15:29:07 2007
@@ -18,7 +18,7 @@
 <p>First, you need a working instance of Hadoop.  Download a recent release from
 <a href="http://www.apache.org/dyn/closer.cgi/lucene/hadoop/">Hadoop downloads</a>.

 Unpack the release and connect to its top-level directory.  Let this be
-<code>${HADOOP_HOME}.  Edit the file <code>${HADOOP_HOME}/conf/hadoop-env.sh</code>
+<code>${HADOOP_HOME}</code>.  Edit the file <code>${HADOOP_HOME}/conf/hadoop-env.sh</code>
 to define at least <code>JAVA_HOME</code>.  Also, add site-particular
 customizations to the file <code>${HADOOP_HOME}/conf/hadoop-site.xml</code>.
 Try the following command: <pre>bin/hadoop



Mime
View raw message