flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] carp84 commented on a change in pull request #12144: [FLINK-17384][flink-dist] support read hbase conf dir from flink.conf and change HBaseConfiguration construction.
Date Wed, 03 Jun 2020 14:11:55 GMT

carp84 commented on a change in pull request #12144:
URL: https://github.com/apache/flink/pull/12144#discussion_r434597698



##########
File path: flink-connectors/flink-connector-hbase/src/main/java/org/apache/flink/connector/hbase/util/HBaseConfigurationUtil.java
##########
@@ -22,20 +22,85 @@
 import org.apache.flink.util.Preconditions;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.io.Writable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
+import java.io.File;
 import java.io.IOException;
 
 /**
- * This class helps to do serialization for hadoop Configuration.
+ * This class helps to do serialization for hadoop Configuration and HBase-related classes.
  */
 @Internal
 public class HBaseConfigurationUtil {
 
+	private static final Logger LOG = LoggerFactory.getLogger(HBaseConfigurationUtil.class);
+
+	@SuppressWarnings("deprecation")
+	public static Configuration getHBaseConfiguration() {
+
+		// Instantiate an HBaseConfiguration to load the hbase-default.xml and hbase-site.xml from
the classpath.
+		Configuration result = new HBaseConfiguration().create();

Review comment:
       ```suggestion
   		Configuration result = HBaseConfiguration.create();
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message