You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2015/12/16 18:22:33 UTC
phoenix git commit: PHOENIX-2533 Phoenix compilation fails as
ZKUtil.applyClusterKeyToConf method is removed (Ravi Kishore Valeti)
Repository: phoenix
Updated Branches:
refs/heads/master de37a9a6b -> 2685d5464
PHOENIX-2533 Phoenix compilation fails as ZKUtil.applyClusterKeyToConf method is removed (Ravi Kishore Valeti)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2685d546
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2685d546
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2685d546
Branch: refs/heads/master
Commit: 2685d54649341dfe060b77c5678541e0ab32805b
Parents: de37a9a
Author: James Taylor <jt...@salesforce.com>
Authored: Wed Dec 16 09:22:25 2015 -0800
Committer: James Taylor <jt...@salesforce.com>
Committed: Wed Dec 16 09:22:25 2015 -0800
----------------------------------------------------------------------
.../mapreduce/index/DirectHTableWriter.java | 38 ++------------------
1 file changed, 2 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/2685d546/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/DirectHTableWriter.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/DirectHTableWriter.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/DirectHTableWriter.java
index d18fde9..59b26b2 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/DirectHTableWriter.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/DirectHTableWriter.java
@@ -22,10 +22,9 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.zookeeper.ZKUtil;
+import org.apache.hadoop.hbase.mapreduce.TableOutputFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,25 +38,6 @@ public class DirectHTableWriter {
private HTable table;
- /** Job parameter that specifies the output table. */
- public static final String OUTPUT_TABLE = "hbase.mapred.outputtable";
-
- /**
- * Optional job parameter to specify a peer cluster. Used specifying remote cluster when copying
- * between hbase clusters (the source is picked up from <code>hbase-site.xml</code>).
- * @see TableMapReduceUtil#initTableReducerJob(String, Class, org.apache.hadoop.mapreduce.Job,
- * Class, String, String, String)
- */
- public static final String QUORUM_ADDRESS = "hbase.mapred.output.quorum";
-
- /** Optional job parameter to specify peer cluster's ZK client port */
- public static final String QUORUM_PORT = "hbase.mapred.output.quorum.port";
-
- /** Optional specification of the rs class name of the peer cluster */
- public static final String REGION_SERVER_CLASS = "hbase.mapred.output.rs.class";
- /** Optional specification of the rs impl name of the peer cluster */
- public static final String REGION_SERVER_IMPL = "hbase.mapred.output.rs.impl";
-
public DirectHTableWriter(Configuration otherConf) {
setConf(otherConf);
}
@@ -65,26 +45,12 @@ public class DirectHTableWriter {
protected void setConf(Configuration otherConf) {
this.conf = HBaseConfiguration.create(otherConf);
- String tableName = this.conf.get(OUTPUT_TABLE);
+ String tableName = this.conf.get(TableOutputFormat.OUTPUT_TABLE);
if (tableName == null || tableName.length() <= 0) {
throw new IllegalArgumentException("Must specify table name");
}
- String address = this.conf.get(QUORUM_ADDRESS);
- int zkClientPort = this.conf.getInt(QUORUM_PORT, 0);
- String serverClass = this.conf.get(REGION_SERVER_CLASS);
- String serverImpl = this.conf.get(REGION_SERVER_IMPL);
-
try {
- if (address != null) {
- ZKUtil.applyClusterKeyToConf(this.conf, address);
- }
- if (serverClass != null) {
- this.conf.set(HConstants.REGION_SERVER_IMPL, serverImpl);
- }
- if (zkClientPort != 0) {
- this.conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, zkClientPort);
- }
this.table = new HTable(this.conf, tableName);
this.table.setAutoFlush(false, true);
LOG.info("Created table instance for " + tableName);