@Override public byte getStoragePolicyID() { byte id = getLocalStoragePolicyID(); if (id == BLOCK_STORAGE_POLICY_ID_UNSPECIFIED) { id = this.getParent() != null ? this.getParent().getStoragePolicyID() : id; } // For Striped EC files, we support only suitable policies. Current // supported policies are HOT, COLD, ALL_SSD. // If the file was set with any other policies, then we just treat policy as // BLOCK_STORAGE_POLICY_ID_UNSPECIFIED. if (isStriped() && id != BLOCK_STORAGE_POLICY_ID_UNSPECIFIED && !ErasureCodingPolicyManager .checkStoragePolicySuitableForECStripedMode(id)) { id = HdfsConstants.BLOCK_STORAGE_POLICY_ID_UNSPECIFIED; if (LOG.isDebugEnabled()) { LOG.debug("The current effective storage policy id : " + id + " is not suitable for striped mode EC file : " + getName() + ". So, just returning unspecified storage policy id"); } } return id; }
newNode.getFileUnderConstructionFeature().getClientMachine()) .setOverwrite(overwrite) .setStoragePolicyId(newNode.getLocalStoragePolicyID()) .setErasureCodingPolicyId(newNode.getErasureCodingPolicyID());
@Override public byte getStoragePolicyID() { byte id = getLocalStoragePolicyID(); if (id == ID_UNSPECIFIED) { return this.getParent() != null ? this.getParent().getStoragePolicyID() : id; } return id; }
@Override public byte getStoragePolicyID() { byte id = getLocalStoragePolicyID(); if (id == ID_UNSPECIFIED) { return this.getParent() != null ? this.getParent().getStoragePolicyID() : id; } return id; }
newNode.getFileUnderConstructionFeature().getClientMachine()) .setOverwrite(overwrite) .setStoragePolicyId(newNode.getLocalStoragePolicyID());
newNode.getFileUnderConstructionFeature().getClientMachine()) .setOverwrite(overwrite) .setStoragePolicyId(newNode.getLocalStoragePolicyID());