From 2e34d1d7db35cd854d540452d144c96e712037ae Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Fri, 12 Oct 2018 11:30:57 -0700 Subject: [PATCH] HDDS-641. Fix ozone filesystem robot test. Contributed by Mukul Kumar Singh. (cherry picked from commit 85ccab7d3f87b71170e4f71c76f5663d1fe34886) --- .../dist/src/main/compose/ozonefs/docker-config | 1 + .../dist/src/main/compose/ozoneperf/docker-config | 1 + .../dist/src/main/compose/ozonescripts/docker-config | 1 + .../dist/src/main/smoketest/ozonefs/ozonefs.robot | 12 ++++++++---- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hadoop-ozone/dist/src/main/compose/ozonefs/docker-config b/hadoop-ozone/dist/src/main/compose/ozonefs/docker-config index 3171f089e1b..4ff7f569f04 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonefs/docker-config +++ b/hadoop-ozone/dist/src/main/compose/ozonefs/docker-config @@ -26,6 +26,7 @@ OZONE-SITE.XML_ozone.handler.type=distributed OZONE-SITE.XML_ozone.scm.client.address=scm OZONE-SITE.XML_ozone.scm.heartbeat.interval=3s HDFS-SITE.XML_rpc.metrics.quantile.enable=true +OZONE-SITE.XML_ozone.replication=1 HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300 LOG4J.PROPERTIES_log4j.rootLogger=INFO, stdout LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-config b/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-config index 1ed116992c2..f1c01473a2c 100644 --- a/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-config +++ b/hadoop-ozone/dist/src/main/compose/ozoneperf/docker-config @@ -25,6 +25,7 @@ OZONE-SITE.XML_ozone.handler.type=distributed OZONE-SITE.XML_ozone.scm.client.address=scm HDFS-SITE.XML_rpc.metrics.quantile.enable=true HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300 +OZONE-SITE.XML_ozone.replication=1 LOG4J.PROPERTIES_log4j.rootLogger=INFO, stdout LOG4J.PROPERTIES_log4j.appender.stdout=org.apache.log4j.ConsoleAppender LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/hadoop-ozone/dist/src/main/compose/ozonescripts/docker-config b/hadoop-ozone/dist/src/main/compose/ozonescripts/docker-config index 1afec73e0ed..ee725af8c7b 100644 --- a/hadoop-ozone/dist/src/main/compose/ozonescripts/docker-config +++ b/hadoop-ozone/dist/src/main/compose/ozonescripts/docker-config @@ -25,6 +25,7 @@ OZONE-SITE.XML_ozone.om.http-address=om:9874 OZONE-SITE.XML_ozone.scm.block.client.address=scm OZONE-SITE.XML_ozone.metadata.dirs=/data/metadata OZONE-SITE.XML_ozone.scm.client.address=scm +OZONE-SITE.XML_ozone.replication=1 OZONE-SITE.XML_hdds.datanode.plugins=org.apache.hadoop.ozone.web.OzoneHddsDatanodeService HDFS-SITE.XML_dfs.namenode.rpc-address=namenode:9000 HDFS-SITE.XML_dfs.namenode.name.dir=/data/namenode diff --git a/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot b/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot index 236c5b27df3..3720d011a3b 100644 --- a/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot +++ b/hadoop-ozone/dist/src/main/smoketest/ozonefs/ozonefs.robot @@ -80,6 +80,7 @@ Run ozoneFS tests ${result} = Execute ozone sh key list o3://ozoneManager/fstest/bucket1 | grep -v WARN | jq -r '.[].keyName' Should not contain ${result} testdir + Execute rm -Rf localdir1 Execute mkdir localdir1 Execute cp NOTICE.txt localdir1/LOCAL.txt Execute ozone fs -mkdir -p o3://bucket1.fstest/testdir1 @@ -95,14 +96,17 @@ Run ozoneFS tests Execute ozone fs -cp o3://bucket1.fstest/testdir1/localdir1 o3://bucket2.fstest/testdir2/ - Execute ozone fs -cp o3://bucket1.fstest/testdir1/localdir1 o3://bucket3.fstest1/testdir3/ + Execute ozone fs -cp o3://bucket1.fstest/testdir1/localdir1 o3://bucket3.fstest2/testdir3/ Execute ozone sh key put o3://ozoneManager/fstest/bucket1/KEY.txt NOTICE.txt ${result} = Execute ozone fs -ls o3://bucket1.fstest/KEY.txt Should contain ${result} KEY.txt - ${result} = Execute ozone fs -copyFromLocal NOTICE.txt o3://bucket1.fstest/KEY.txt - Should contain ${result} 'File exists' + ${rc} ${result} = Run And Return Rc And Output ozone fs -copyFromLocal NOTICE.txt o3://bucket1.fstest/KEY.txt + Should Be Equal As Integers ${rc} 1 + Should contain ${result} File exists + Execute rm -Rf GET.txt Execute ozone fs -get o3://bucket1.fstest/KEY.txt GET.txt Execute ls -l GET.txt - ${result} = Execute ozone fs -ls o3://abcde.pqrs/ + ${rc} ${result} = Run And Return Rc And Output ozone fs -ls o3://abcde.pqrs/ + Should Be Equal As Integers ${rc} 1 Should contain ${result} VOLUME_NOT_FOUND