tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blrun...@apache.org
Subject tajo git commit: TAJO-1320: HBaseStorageManager need to support Zookeeper Client Port. (jaehwa)
Date Wed, 28 Jan 2015 04:34:28 GMT
Repository: tajo
Updated Branches:
  refs/heads/master c429c9710 -> b9719ba78


TAJO-1320: HBaseStorageManager need to support Zookeeper Client Port. (jaehwa)

Closes #363


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/b9719ba7
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/b9719ba7
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/b9719ba7

Branch: refs/heads/master
Commit: b9719ba78ef441772ee7f5ffa44844627df95891
Parents: c429c97
Author: JaeHwa Jung <blrunner@apache.org>
Authored: Wed Jan 28 13:33:01 2015 +0900
Committer: JaeHwa Jung <blrunner@apache.org>
Committed: Wed Jan 28 13:33:01 2015 +0900

----------------------------------------------------------------------
 CHANGES                                                  |  3 +++
 .../apache/tajo/storage/hbase/HBaseStorageConstants.java |  1 +
 .../apache/tajo/storage/hbase/HBaseStorageManager.java   | 11 +++++++++++
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/b9719ba7/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 453e163..3b59347 100644
--- a/CHANGES
+++ b/CHANGES
@@ -27,6 +27,9 @@ Release 0.10.0 - unreleased
 
   IMPROVEMENT
 
+    TAJO-1320: HBaseStorageManager need to support Zookeeper Client Port.
+    (jaehwa)
+
     TAJO-1309: Add missing break point in physical operator. (jinho)
 
     TAJO-1307: HBaseStorageManager need to support for users to use

http://git-wip-us.apache.org/repos/asf/tajo/blob/b9719ba7/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageConstants.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageConstants.java
b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageConstants.java
index 2c525a1..99140e6 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageConstants.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageConstants.java
@@ -27,6 +27,7 @@ public interface HBaseStorageConstants {
   public static final String META_SPLIT_ROW_KEYS_KEY = "hbase.split.rowkeys";
   public static final String META_SPLIT_ROW_KEYS_FILE_KEY = "hbase.split.rowkeys.file";
   public static final String META_ZK_QUORUM_KEY = "hbase.zookeeper.quorum";
+  public static final String META_ZK_CLIENT_PORT = "hbase.zookeeper.property.clientPort";
   public static final String META_ROWKEY_DELIMITER = "hbase.rowkey.delimiter";
 
   public static final String INSERT_PUT_MODE = "tajo.hbase.insert.put.mode";

http://git-wip-us.apache.org/repos/asf/tajo/blob/b9719ba7/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
----------------------------------------------------------------------
diff --git a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
index 59d1b48..2a635d8 100644
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/HBaseStorageManager.java
@@ -312,6 +312,17 @@ public class HBaseStorageManager extends StorageManager {
           HBaseStorageConstants.META_ZK_QUORUM_KEY + "' attribute.");
     }
 
+    String zkPort = hbaseConf.get(HConstants.ZOOKEEPER_CLIENT_PORT);
+    if (tableMeta.containsOption(HBaseStorageConstants.META_ZK_CLIENT_PORT)) {
+      zkPort = tableMeta.getOption(HBaseStorageConstants.META_ZK_CLIENT_PORT, "");
+      hbaseConf.set(HConstants.ZOOKEEPER_CLIENT_PORT, zkPort);
+    }
+
+    if (zkPort == null || zkPort.trim().isEmpty()) {
+      throw new IOException("HBase mapped table is required a '" +
+        HBaseStorageConstants.META_ZK_CLIENT_PORT + "' attribute.");
+    }
+
     for (Map.Entry<String, String> eachOption: tableMeta.getOptions().getAllKeyValus().entrySet())
{
       String key = eachOption.getKey();
       if (key.startsWith(HConstants.ZK_CFG_PROPERTY_PREFIX)) {


Mime
View raw message