You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2012/06/16 01:56:54 UTC

svn commit: r1350829 - /incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy

Author: rvs
Date: Fri Jun 15 23:56:53 2012
New Revision: 1350829

URL: http://svn.apache.org/viewvc?rev=1350829&view=rev
Log:
BIGTOP-618. Add HBase hbck test (Stephen Chu via rvs)

Added:
    incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy

Added: incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy?rev=1350829&view=auto
==============================================================================
--- incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy (added)
+++ incubator/bigtop/trunk/bigtop-tests/test-artifacts/hbase/src/main/groovy/org/apache/bigtop/itest/hbase/smoke/TestHbck.groovy Fri Jun 15 23:56:53 2012
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.bigtop.itest.hbase.smoke
+
+import org.junit.Test
+import org.apache.bigtop.itest.shell.Shell
+import static org.junit.Assert.assertTrue
+import static org.apache.bigtop.itest.LogErrorsUtils.logError
+
+/**
+ * Validates the HBase cluster health.
+ */
+public class TestHbck {
+  static Shell sh = new Shell("/bin/bash -s")
+  String[] hbckCmds = [
+    "hbase hbck",
+    "hbase hbck -details",
+    "hbase hbck -timelag 120",
+    "hbase hbck -summary",
+    "hbase hbck -metaonly"
+  ]
+
+  @Test
+  public void testHbck() {
+    for (cmd in hbckCmds) {
+      sh.exec(cmd)
+      logError(sh)
+      assertTrue(sh.getRet() == 0)
+    }
+  }
+
+}