HDFS-12365. Ozone: ListVolume displays incorrect createdOn time when the volume was created by OzoneRpcClient. Contributed by Weiwei Yang.

This commit is contained in:
Chen Liang 2017-08-28 10:28:20 -07:00 committed by Owen O'Malley
parent eef437d5e2
commit 8654698d74
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,7 @@
import org.apache.hadoop.scm.protocolPB
.StorageContainerLocationProtocolPB;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.util.Time;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -201,6 +202,7 @@ public void createVolume(String volumeName, String owner,
.setOwnerName(owner)
.setVolume(volumeName)
.setQuotaInBytes(quota)
.setCreationTime(Time.now())
.addOzoneAcls(KSMPBHelper.convertOzoneAcl(userAcl));
List<OzoneAcl> listOfAcls = new ArrayList<>();