Apache9 commented on code in PR #6385:
URL: https://github.com/apache/hbase/pull/6385#discussion_r3009236701
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java:
##########
@@ -264,11 +265,10 @@ protected HStore(final HRegion region, final
ColumnFamilyDescriptor family,
region.getRegionFileSystem().createStoreDir(family.getNameAsString());
// set block storage policy for store directory
- String policyName = family.getStoragePolicy();
- if (null == policyName) {
- policyName = this.conf.get(BLOCK_STORAGE_POLICY_KEY,
DEFAULT_BLOCK_STORAGE_POLICY);
- }
- region.getRegionFileSystem().setStoragePolicy(family.getNameAsString(),
policyName.trim());
+ this.policyName = Optional.ofNullable(family.getStoragePolicy())
Review Comment:
The lambda does not help too much here I'd say.
Let's keep the old way?
```
String pName = family.getStoragePolicy() != null ? family.getStoragePolicy()
: conf.get(BLOCK_STORAGE_POLICY_KEY, DEFAULT_BLOCK_STORAGE_POLICY);
this.policyName = pName.trim();
```
--
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]