anoopsjohn commented on a change in pull request #3661:
URL: https://github.com/apache/hbase/pull/3661#discussion_r702427690



##########
File path: 
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSnapshotInputFormatImpl.java
##########
@@ -392,17 +405,41 @@ public static Scan extractScanFromConf(Configuration 
conf) throws IOException {
       SNAPSHOT_INPUTFORMAT_SCAN_METRICS_ENABLED_DEFAULT);
     scan.setScanMetricsEnabled(scanMetricsEnabled);
 
+    boolean useRegionLoc = 
conf.getBoolean(SNAPSHOT_INPUTFORMAT_LOCALITY_BY_REGION_LOCATION,
+      SNAPSHOT_INPUTFORMAT_LOCALITY_BY_REGION_LOCATION_DEFAULT);
+
+    Connection connection;
+    RegionLocator regionLocator = null;
+    if (localityEnabled && useRegionLoc) {
+      connection = ConnectionFactory.createConnection(new Configuration(conf));

Review comment:
       Closing this connection?
   Also on this connection, we will make calls to read from hbase:meta only. We 
can set connection executor pool size with lowering value for 
'hbase.hconnection.threads.max'?  We allow core threads to die but initially 
will create more threads (256). 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to