hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cli...@apache.org
Subject hadoop git commit: HDFS-12391. Ozone: TestKSMSQLCli is not working as expected. Contributed by Weiwei Yang.
Date Tue, 05 Sep 2017 18:13:59 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 ac5f01c31 -> d23e1ed8c


HDFS-12391. Ozone: TestKSMSQLCli is not working as expected. Contributed by Weiwei Yang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d23e1ed8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d23e1ed8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d23e1ed8

Branch: refs/heads/HDFS-7240
Commit: d23e1ed8c4397a06878d7e7c5c297ccbb7f322a5
Parents: ac5f01c
Author: Chen Liang <cliang@apache.org>
Authored: Tue Sep 5 11:14:33 2017 -0700
Committer: Chen Liang <cliang@apache.org>
Committed: Tue Sep 5 11:14:33 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/ozone/scm/cli/SQLCLI.java |  2 +-
 .../apache/hadoop/ozone/ksm/TestKSMSQLCli.java  | 41 +++++++++-----------
 2 files changed, 20 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d23e1ed8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/cli/SQLCLI.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/cli/SQLCLI.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/cli/SQLCLI.java
index d674b64..4a8121d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/cli/SQLCLI.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/cli/SQLCLI.java
@@ -346,7 +346,7 @@ public class SQLCLI  extends Configured implements Tool {
     LOG.info("Create tables for sql ksm db.");
     File dbFile = dbPath.toFile();
     try (MetadataStore dbStore = MetadataStoreBuilder.newBuilder()
-        .setDbFile(dbFile).build();
+        .setConf(conf).setDbFile(dbFile).build();
          Connection conn = connectDB(outPath.toString())) {
       executeSQL(conn, CREATE_VOLUME_LIST);
       executeSQL(conn, CREATE_VOLUME_INFO);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/d23e1ed8/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/ksm/TestKSMSQLCli.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/ksm/TestKSMSQLCli.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/ksm/TestKSMSQLCli.java
index 6a2b0f6..9fa7ec5 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/ksm/TestKSMSQLCli.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/ksm/TestKSMSQLCli.java
@@ -60,23 +60,23 @@ import static org.junit.Assert.assertTrue;
  */
 @RunWith(Parameterized.class)
 public class TestKSMSQLCli {
-  private static MiniOzoneCluster cluster = null;
-  private static StorageHandler storageHandler;
-  private static UserArgs userArgs;
-  private static OzoneConfiguration conf;
-  private static SQLCLI cli;
+  private MiniOzoneCluster cluster = null;
+  private StorageHandler storageHandler;
+  private UserArgs userArgs;
+  private OzoneConfiguration conf;
+  private SQLCLI cli;
 
-  private static String userName = "userTest";
-  private static String adminName = "adminTest";
-  private static String volumeName0 = "volumeTest0";
-  private static String volumeName1 = "volumeTest1";
-  private static String bucketName0 = "bucketTest0";
-  private static String bucketName1 = "bucketTest1";
-  private static String bucketName2 = "bucketTest2";
-  private static String keyName0 = "key0";
-  private static String keyName1 = "key1";
-  private static String keyName2 = "key2";
-  private static String keyName3 = "key3";
+  private String userName = "userTest";
+  private String adminName = "adminTest";
+  private String volumeName0 = "volumeTest0";
+  private String volumeName1 = "volumeTest1";
+  private String bucketName0 = "bucketTest0";
+  private String bucketName1 = "bucketTest1";
+  private String bucketName2 = "bucketTest2";
+  private String keyName0 = "key0";
+  private String keyName1 = "key1";
+  private String keyName2 = "key2";
+  private String keyName3 = "key3";
 
   @Parameterized.Parameters
   public static Collection<Object[]> data() {
@@ -86,7 +86,7 @@ public class TestKSMSQLCli {
     });
   }
 
-  private static String metaStoreType;
+  private String metaStoreType;
 
   public TestKSMSQLCli(String type) {
     metaStoreType = type;
@@ -100,8 +100,8 @@ public class TestKSMSQLCli {
    *
    * @throws IOException
    */
-  @BeforeClass
-  public static void setup() throws Exception {
+  @Before
+  public void setup() throws Exception {
     conf = new OzoneConfiguration();
     conf.set(OzoneConfigKeys.OZONE_HANDLER_TYPE_KEY,
         OzoneConsts.OZONE_HANDLER_DISTRIBUTED);
@@ -151,10 +151,7 @@ public class TestKSMSQLCli {
     stream.close();
 
     cluster.shutdown();
-  }
 
-  @Before
-  public void init() throws Exception {
     conf.set(OzoneConfigKeys.OZONE_METADATA_STORE_IMPL, metaStoreType);
     cli = new SQLCLI(conf);
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message