Author: larsh
Date: Mon Mar 31 22:36:42 2014
New Revision: 1583480
URL: http://svn.apache.org/r1583480
Log:
HBASE-10847 0.94: drop non-secure builds, make security the default.
Added:
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSideWithSecureRpcEngine.java
Modified:
hbase/branches/0.94/pom.xml
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
Modified: hbase/branches/0.94/pom.xml
URL:
http://svn.apache.org/viewvc/hbase/branches/0.94/pom.xml?rev=1583480&r1=1583479&r2=1583480&view=diff
==============================================================================
--- hbase/branches/0.94/pom.xml (original)
+++ hbase/branches/0.94/pom.xml Mon Mar 31 22:36:42 2014
@@ -943,6 +943,28 @@
<version>1.5</version>
<executions>
<execution>
+ <id>add-source</id>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/security/src/main/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>add-test-source</id>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/security/src/test/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ <execution>
<id>jspcSource-packageInfo-Avro-source</id>
<phase>generate-sources</phase>
<goals>
@@ -1665,9 +1687,9 @@
</build>
</profile>
- <!-- profile for building against Hadoop 0.20+security-->
+ <!-- profile only used for testing, run's all tests with the
SecureRpcEngine -->
<profile>
- <id>security</id>
+ <id>security-test</id>
<properties>
<hadoop.version>1.0.4</hadoop.version>
</properties>
@@ -1679,28 +1701,6 @@
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
- <id>add-source</id>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/security/src/main/java</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-test-source</id>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/security/src/test/java</source>
- </sources>
- </configuration>
- </execution>
- <execution>
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
Modified:
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java?rev=1583480&r1=1583479&r2=1583480&view=diff
==============================================================================
---
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
(original)
+++
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
Mon Mar 31 22:36:42 2014
@@ -47,7 +47,6 @@ import java.util.concurrent.ExecutorServ
import java.util.concurrent.Executors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.commons.lang.ArrayUtils;
@@ -85,6 +84,7 @@ import org.apache.hadoop.hbase.filter.Si
import org.apache.hadoop.hbase.filter.WhileMatchFilter;
import org.apache.hadoop.hbase.io.hfile.BlockCache;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
+import org.apache.hadoop.hbase.ipc.SecureRpcEngine;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.HRegionServer;
import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
@@ -123,6 +123,8 @@ public class TestFromClientSide {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
Configuration conf = TEST_UTIL.getConfiguration();
+ // force the rpc engine to the non-secure one in order to get coverage
+ conf.set("hbase.rpc.engine",
"org.apache.hadoop.hbase.ipc.WritableRpcEngine");
conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
MultiRowMutationEndpoint.class.getName());
// We need more than one region server in this test
Added:
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSideWithSecureRpcEngine.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSideWithSecureRpcEngine.java?rev=1583480&view=auto
==============================================================================
---
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSideWithSecureRpcEngine.java
(added)
+++
hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSideWithSecureRpcEngine.java
Mon Mar 31 22:36:42 2014
@@ -0,0 +1,42 @@
+/*
+ * 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.hadoop.hbase.client;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.LargeTests;
+import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
+import org.apache.hadoop.hbase.coprocessor.MultiRowMutationEndpoint;
+import org.apache.hadoop.hbase.ipc.SecureRpcEngine;
+import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
+
+/**
+ * Test all client operations with {@link SecureRpcEngine}
+ */
+@Category(LargeTests.class)
+public class TestFromClientSideWithSecureRpcEngine extends TestFromClientSide {
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ Configuration conf = TEST_UTIL.getConfiguration();
+ conf.set("hbase.rpc.engine", SecureRpcEngine.class.getName());
+ conf.setStrings(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
+ MultiRowMutationEndpoint.class.getName());
+ // We need more than one region server in this test
+ TEST_UTIL.startMiniCluster(SLAVES);
+ }
+}