[hadoop-ozone] branch master updated (f3abb4c -> 1d56bc2)

2019-12-08 Thread msingh
This is an automated email from the ASF dual-hosted git repository.

msingh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git.


from f3abb4c  HDDS-2668. Sonar : fix issues reported in BlockManagerImpl 
(#317)
 add 1d56bc2  HDDS-2645. Refactor MiniOzoneChaosCluster to a different 
package to add filesystem tests. (#292)

No new revisions were added by this update.

Summary of changes:
 .../fault-injection-test/mini-chaos-tests}/pom.xml |  37 ---
 .../mini-chaos-tests}/src/test/bin/start-chaos.sh  |  32 +++---
 .../hadoop/ozone}/MiniOzoneChaosCluster.java   |   9 +-
 .../hadoop/ozone}/MiniOzoneLoadGenerator.java  | 108 +
 .../hadoop/ozone}/TestMiniChaosOzoneCluster.java   |  14 +--
 .../org/apache/hadoop/ozone/utils/LoadBucket.java  |  99 +++
 .../hadoop/ozone/utils}/TestProbability.java   |   2 +-
 .../services/org.apache.hadoop.fs.FileSystem   |   0
 .../src/test/resources/log4j.properties|   8 +-
 hadoop-ozone/fault-injection-test/pom.xml  |   1 +
 10 files changed, 179 insertions(+), 131 deletions(-)
 copy {hadoop-hdds/tools => 
hadoop-ozone/fault-injection-test/mini-chaos-tests}/pom.xml (68%)
 rename hadoop-ozone/{integration-test => 
fault-injection-test/mini-chaos-tests}/src/test/bin/start-chaos.sh (57%)
 rename 
hadoop-ozone/{integration-test/src/test/java/org/apache/hadoop/ozone/chaos => 
fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone}/MiniOzoneChaosCluster.java
 (95%)
 rename 
hadoop-ozone/{integration-test/src/test/java/org/apache/hadoop/ozone/chaos => 
fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone}/MiniOzoneLoadGenerator.java
 (66%)
 rename 
hadoop-ozone/{integration-test/src/test/java/org/apache/hadoop/ozone/chaos => 
fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone}/TestMiniChaosOzoneCluster.java
 (90%)
 create mode 100644 
hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/utils/LoadBucket.java
 rename 
hadoop-ozone/{integration-test/src/test/java/org/apache/hadoop/ozone/chaos => 
fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/utils}/TestProbability.java
 (97%)
 copy hadoop-ozone/{tools/src/main => 
fault-injection-test/mini-chaos-tests/src/test}/resources/META-INF/services/org.apache.hadoop.fs.FileSystem
 (100%)
 copy hadoop-ozone/{ozonefs => 
fault-injection-test/mini-chaos-tests}/src/test/resources/log4j.properties (75%)


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] branch master updated: HDDS-2687. Fix sonar issues in package org.apache.hadoop.ozone.recon.api. (#325)

2019-12-08 Thread dineshc
This is an automated email from the ASF dual-hosted git repository.

dineshc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
 new 91a6477  HDDS-2687. Fix sonar issues in package 
org.apache.hadoop.ozone.recon.api. (#325)
91a6477 is described below

commit 91a64d21ca1e1b6abfed5f5445ecb9fda127
Author: avijayanhwx <14299376+avijayan...@users.noreply.github.com>
AuthorDate: Sun Dec 8 20:41:42 2019 -0800

HDDS-2687. Fix sonar issues in package org.apache.hadoop.ozone.recon.api. 
(#325)
---
 .../ozone/recon/api/ContainerKeyService.java   | 112 -
 .../hadoop/ozone/recon/api/TaskStatusService.java  |  10 +-
 .../hadoop/ozone/recon/api/UtilizationService.java |   5 -
 3 files changed, 66 insertions(+), 61 deletions(-)

diff --git 
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerKeyService.java
 
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerKeyService.java
index cb4ff72..ee12350 100644
--- 
a/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerKeyService.java
+++ 
b/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerKeyService.java
@@ -127,61 +127,51 @@ public class ContainerKeyService {
 
 // Directly calling get() on the Key table instead of iterating since
 // only full keys are supported now. When we change to using a prefix
-// of the key, this needs to change to prefix seek (TODO).
+// of the key, this needs to change to prefix seek.
 OmKeyInfo omKeyInfo = omMetadataManager.getKeyTable().get(
 containerKeyPrefix.getKeyPrefix());
-if (null == omKeyInfo) {
-  continue;
-}
-
-// Filter keys by version.
-List matchedKeys = omKeyInfo
-.getKeyLocationVersions()
-.stream()
-.filter(k -> (k.getVersion() == 
containerKeyPrefix.getKeyVersion()))
-.collect(Collectors.toList());
-
-List blockIds = new ArrayList<>();
-for (OmKeyLocationInfoGroup omKeyLocationInfoGroup : matchedKeys) {
-  List omKeyLocationInfos = omKeyLocationInfoGroup
-  .getLocationList()
+if (null != omKeyInfo) {
+  // Filter keys by version.
+  List matchedKeys = omKeyInfo
+  .getKeyLocationVersions()
   .stream()
-  .filter(c -> c.getContainerID() == containerID)
+  .filter(k -> (k.getVersion() ==
+  containerKeyPrefix.getKeyVersion()))
   .collect(Collectors.toList());
-  for (OmKeyLocationInfo omKeyLocationInfo : omKeyLocationInfos) {
-blockIds.add(new ContainerBlockMetadata(omKeyLocationInfo
-.getContainerID(), omKeyLocationInfo.getLocalID()));
-  }
-}
 
-String ozoneKey = omMetadataManager.getOzoneKey(
-omKeyInfo.getVolumeName(),
-omKeyInfo.getBucketName(),
-omKeyInfo.getKeyName());
-if (keyMetadataMap.containsKey(ozoneKey)) {
-  keyMetadataMap.get(ozoneKey).getVersions()
-  .add(containerKeyPrefix.getKeyVersion());
-
-  keyMetadataMap.get(ozoneKey).getBlockIds()
-  .put(containerKeyPrefix.getKeyVersion(), blockIds);
-} else {
-  // break the for loop if limit has been reached
-  if (keyMetadataMap.size() == limit) {
-break;
+  List blockIds =
+  getBlocks(matchedKeys, containerID);
+
+  String ozoneKey = omMetadataManager.getOzoneKey(
+  omKeyInfo.getVolumeName(),
+  omKeyInfo.getBucketName(),
+  omKeyInfo.getKeyName());
+  if (keyMetadataMap.containsKey(ozoneKey)) {
+keyMetadataMap.get(ozoneKey).getVersions()
+.add(containerKeyPrefix.getKeyVersion());
+
+keyMetadataMap.get(ozoneKey).getBlockIds()
+.put(containerKeyPrefix.getKeyVersion(), blockIds);
+  } else {
+// break the for loop if limit has been reached
+if (keyMetadataMap.size() == limit) {
+  break;
+}
+KeyMetadata keyMetadata = new KeyMetadata();
+keyMetadata.setBucket(omKeyInfo.getBucketName());
+keyMetadata.setVolume(omKeyInfo.getVolumeName());
+keyMetadata.setKey(omKeyInfo.getKeyName());
+keyMetadata.setCreationTime(
+Instant.ofEpochMilli(omKeyInfo.getCreationTime()));
+keyMetadata.setModificationTime(
+Instant.ofEpochMilli(omKeyInfo.getModificationTime()));
+keyMetadata.setDataSize(omKeyInfo.getDataSize());
+keyMetadata.getVersions().add(containerKeyPrefix.getKeyVersion());
+keyMetadataMap.put(ozoneKey, keyMetadata);
+

[hadoop-ozone] branch integration-test-cleanup updated: retrigger build

2019-12-08 Thread elek
This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch integration-test-cleanup
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/integration-test-cleanup by 
this push:
 new 6de7a92  retrigger build
6de7a92 is described below

commit 6de7a9276245a419ba1d5eac077efd461a7c5901
Author: Márton Elek 
AuthorDate: Sun Dec 8 16:12:50 2019 +0100

retrigger build


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] branch debug-acceptance-timeout updated: retrigger build

2019-12-08 Thread elek
This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch debug-acceptance-timeout
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/debug-acceptance-timeout by 
this push:
 new 6e345ce  retrigger build
6e345ce is described below

commit 6e345ce8c203f14fdd17336b9865f4c23ed3ec15
Author: Márton Elek 
AuthorDate: Sun Dec 8 16:13:22 2019 +0100

retrigger build


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] 02/02: retrigger build

2019-12-08 Thread elek
This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch debug-acceptance-timeout
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git

commit 19ba2f52ee43266161fd419cc0366b529d3148f5
Author: Márton Elek 
AuthorDate: Sun Dec 8 14:11:41 2019 +0100

retrigger build


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] 01/02: retrigger build

2019-12-08 Thread elek
This is an automated email from the ASF dual-hosted git repository.

elek pushed a commit to branch debug-acceptance-timeout
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git

commit 5f3d69f6c07f302930bab865446234590c9c9f09
Author: Márton Elek 
AuthorDate: Sun Dec 8 14:11:12 2019 +0100

retrigger build


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] branch debug-acceptance-timeout updated (3f2a4f6 -> 19ba2f5)

2019-12-08 Thread elek
This is an automated email from the ASF dual-hosted git repository.

elek pushed a change to branch debug-acceptance-timeout
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git.


from 3f2a4f6  retrigger build
 new 5f3d69f  retrigger build
 new 19ba2f5  retrigger build

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org



[hadoop-ozone] branch master updated: HDDS-2689. OMException NOT_A_FILE missing space in the exception message. (#327)

2019-12-08 Thread ayushsaxena
This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git


The following commit(s) were added to refs/heads/master by this push:
 new 588ff1e  HDDS-2689. OMException NOT_A_FILE missing space in the 
exception message. (#327)
588ff1e is described below

commit 588ff1ed0f83b471622e197bcf1e1e7592d7ec71
Author: avijayanhwx <14299376+avijayan...@users.noreply.github.com>
AuthorDate: Sun Dec 8 01:42:11 2019 -0800

HDDS-2689. OMException NOT_A_FILE missing space in the exception message. 
(#327)
---
 .../apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
index dae18c5..6ee9d26 100644
--- 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
+++ 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java
@@ -208,7 +208,7 @@ public class OMFileCreateRequest extends OMKeyRequest {
 throw new OMException("Can not write to directory: " + keyName,
 OMException.ResultCodes.NOT_A_FILE);
   } else if (omDirectoryResult == FILE_EXISTS_IN_GIVENPATH) {
-throw new OMException("Can not create file: " + keyName + "as there " +
+throw new OMException("Can not create file: " + keyName + " as there " 
+
 "is already file in the given path",
 OMException.ResultCodes.NOT_A_FILE);
   }
@@ -243,8 +243,8 @@ public class OMFileCreateRequest extends OMKeyRequest {
   boolean canBeCreated = checkKeysUnderPath(omMetadataManager,
   volumeName, bucketName, keyName);
   if (!canBeCreated) {
-throw new OMException("Can not create file: " + keyName + "as one" 
+
-" of parent directory is not created",
+throw new OMException("Can not create file: " + keyName +
+" as one of parent directory is not created",
 OMException.ResultCodes.NOT_A_FILE);
   }
 }


-
To unsubscribe, e-mail: ozone-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-commits-h...@hadoop.apache.org