Apache9 commented on a change in pull request #1730:
URL: https://github.com/apache/hbase/pull/1730#discussion_r443201485



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredMultiFileWriter.java
##########
@@ -38,23 +38,33 @@
 
   private final boolean needEmptyFile;
 
+  private final Map<Long, String> lowerBoundariesPolicies;

Review comment:
       ImmutableMap?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DateTieredStoreEngine.java
##########
@@ -94,6 +94,7 @@ public void forceSelect(CompactionRequestImpl request) {
         throws IOException {
       if (request instanceof DateTieredCompactionRequest) {
         return compactor.compact(request, ((DateTieredCompactionRequest) 
request).getBoundaries(),
+          ((DateTieredCompactionRequest) request).getBoundariesPolicies(),

Review comment:
       Cast it to DateTieredCompactionRequest with a locl variable and then 
make use of the casted instance?

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java
##########
@@ -547,6 +553,20 @@ public StoreFileWriter build() throws IOException {
       CommonFSUtils.setStoragePolicy(this.fs, dir, policyName);
 
       if (filePath == null) {
+        // The stored file and related blocks will used the directory based 
StoragePolicy.
+        // Because HDFS DistributedFileSystem does not support create files 
with storage policy
+        // before version 3.3.0 (See HDFS-13209). Use child dir here is to 
make stored files
+        // satisfy the specific storage policy when writing. So as to avoid 
later data movement.
+        // We don't want to change whole temp dir to 'fileStoragePolicy'.
+        if (fileStoragePolicy != null && !fileStoragePolicy.isEmpty()) {

Review comment:
       Just use Strings.isNullOrEmpty in guava.




----------------------------------------------------------------
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:
[email protected]


Reply via email to