[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/523e7905 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/523e7905 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/523e7905 Branch: refs/heads/1.7 Commit: 523e7905fe0c671f9eb2267c3f6087a01e8bdf77 Parents: 9024dd9 397de58 Author: Josh Elser Authored: Mon Apr 25 11:12:30 2016 -0400 Committer: Josh Elser Committed: Mon Apr 25 11:12:30 2016 -0400 -- .../start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/523e7905/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/18caa5b1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/18caa5b1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/18caa5b1 Branch: refs/heads/1.7 Commit: 18caa5b17415e0e570267fa8f25b5f3d9b8b6870 Parents: d42b770 2056cff Author: Christopher Tubbs Authored: Sun Apr 17 13:06:45 2016 -0400 Committer: Christopher Tubbs Committed: Sun Apr 17 13:06:45 2016 -0400 -- .travis.yml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/18caa5b1/.travis.yml -- diff --cc .travis.yml index cf23377,1937917..c6a948f --- a/.travis.yml +++ b/.travis.yml @@@ -31,8 -31,10 +31,9 @@@ jdk - oraclejdk8 - oraclejdk7 - openjdk7 - - openjdk6 # clear any cache of accumulo artifacts, just in case; use https for central before_script: + - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname)/" /etc/hosts | sudo tee /etc/hosts - rm -rf $HOME/.m2/repository/org/apache/accumulo - echo "secure-centralhttps://repo.maven.apache.org/maven2central" > $HOME/settings-custom.xml script: mvn --settings $HOME/settings-custom.xml clean verify -DskipITs
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d9e9d661 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d9e9d661 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d9e9d661 Branch: refs/heads/1.7 Commit: d9e9d661f13f752c6aa45e36e538ba094bd01352 Parents: 12ae485 6665905 Author: Christopher Tubbs Authored: Tue Apr 12 15:08:13 2016 -0400 Committer: Christopher Tubbs Committed: Tue Apr 12 15:08:13 2016 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0cb15fa3 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0cb15fa3 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0cb15fa3 Branch: refs/heads/1.7 Commit: 0cb15fa3086e3a3c0539d44577fa4aca80631466 Parents: eb6a038 cf47ce2 Author: Christopher Tubbs Authored: Thu Apr 7 14:30:44 2016 -0400 Committer: Christopher Tubbs Committed: Thu Apr 7 14:30:44 2016 -0400 -- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0cb15fa3/.travis.yml -- diff --cc .travis.yml index 645ff52,e4626ce..b249511 --- a/.travis.yml +++ b/.travis.yml @@@ -14,5 -14,8 +14,7 @@@ # limitations under the License. language: java jdk: - - openjdk6 + - openjdk7 - oraclejdk7 - script: mvn package + - oraclejdk8 + script: mvn clean verify -DskipITs
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f7a24d75 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f7a24d75 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f7a24d75 Branch: refs/heads/1.7 Commit: f7a24d7516de880ba338a59d57346dbe82cf2dab Parents: 2e4f320 0712471 Author: Josh Elser Authored: Tue Apr 5 11:19:23 2016 -0400 Committer: Josh Elser Committed: Tue Apr 5 11:19:23 2016 -0400 -- .../core/client/impl/TabletServerBatchWriter.java | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f7a24d75/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f181cf6a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f181cf6a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f181cf6a Branch: refs/heads/1.7 Commit: f181cf6a90a913e5453352a56d3ab470f15b068c Parents: 2b286ba 41e002d Author: Josh Elser Authored: Fri Apr 1 09:56:17 2016 -0400 Committer: Josh Elser Committed: Fri Apr 1 09:56:17 2016 -0400 -- .../apache/accumulo/tserver/InMemoryMap.java| 28 +- .../org/apache/accumulo/tserver/MemKey.java | 10 +- .../accumulo/tserver/MemKeyComparator.java | 2 +- .../org/apache/accumulo/tserver/NativeMap.java | 27 +- .../PartialMutationSkippingIterator.java| 2 +- .../org/apache/accumulo/test/InMemoryMapIT.java | 319 +++ 6 files changed, 362 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKey.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java index 739b923,000..a623cac mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/MemKeyComparator.java @@@ -1,44 -1,0 +1,44 @@@ +/* + * 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.accumulo.tserver; + +import java.io.Serializable; +import java.util.Comparator; + +import org.apache.accumulo.core.data.Key; + +class MemKeyComparator implements Comparator, Serializable { + + private static final long serialVersionUID = 1L; + + @Override + public int compare(Key k1, Key k2) { +int cmp = k1.compareTo(k2); + +if (cmp == 0) { + if (k1 instanceof MemKey) +if (k2 instanceof MemKey) - cmp = ((MemKey) k2).kvCount - ((MemKey) k1).kvCount; ++ cmp = ((MemKey) k2).getKVCount() - ((MemKey) k1).getKVCount(); +else + cmp = 1; + else if (k2 instanceof MemKey) +cmp = -1; +} + +return cmp; + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/f181cf6a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java index 6eb8e4e,7e1435e..a6f7cf1 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java @@@ -502,29 -531,17 +503,18 @@@ public class NativeMap implements Itera long uid = startUpdate(nmPointer, mutation.getRow()); for (ColumnUpdate update : updates) { update(nmPointer, uid, update.getColumnFamily(), update.getColumnQualifier(), update.getColumnVisibility(), update.getTimestamp(), update.isDeleted(), - update.getValue(), mutationCount); + update.getValue(), mutationCount++); } - } + return mutationCount; } + @VisibleForTesting public void mutate(Mutation mutation, int mutationCount) { - wlock.lock(); - try { - if (nmPointer == 0) { - throw new IllegalStateException("Native Map Deleted"); - } - - modCount++; - - _mutate(mutation, mutationCount); - } finally
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7d063162 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7d063162 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7d063162 Branch: refs/heads/1.7 Commit: 7d063162c53acf81dae793727c3a2b29336f4cc3 Parents: 422815a b040557 Author: Christopher Tubbs Authored: Thu Mar 24 18:37:39 2016 -0400 Committer: Christopher Tubbs Committed: Thu Mar 24 18:37:39 2016 -0400 -- assemble/bin/start-all.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7d063162/assemble/bin/start-all.sh -- diff --cc assemble/bin/start-all.sh index a4596db,445e046..b670743 --- a/assemble/bin/start-all.sh +++ b/assemble/bin/start-all.sh @@@ -51,11 -50,10 +51,10 @@@ if [ -z "$ZOOKEEPER_VERSION" ]; the echo "Please check ZOOKEEPER_HOME, either globally or in accumulo-env.sh." exit 1 fi - ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION##$ZOOKEEPER_HOME/zookeeper-} - ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION%%.jar} + ZOOKEEPER_VERSION=$(basename "${ZOOKEEPER_VERSION##*-}" .jar) - if [ "$ZOOKEEPER_VERSION" '<' "3.4.0" ]; then -if [[ "$ZOOKEEPER_VERSION" < "3.3.0" ]]; then - echo "WARN : Using Zookeeper $ZOOKEEPER_VERSION. Use version 3.3.0 or greater to avoid zookeeper deadlock bug."; ++if [[ "$ZOOKEEPER_VERSION" < "3.4.0" ]]; then + echo "WARN : Using Zookeeper $ZOOKEEPER_VERSION. Use version 3.4.0 or greater. Older versions may not work reliably."; fi ${bin}/start-server.sh $MONITOR monitor
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e52d5476 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e52d5476 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e52d5476 Branch: refs/heads/1.7 Commit: e52d5476e21da4085b7ee17fe2e05b4b2eb9e585 Parents: d1a9c52 b8836be Author: Christopher Tubbs Authored: Thu Mar 3 18:06:19 2016 -0500 Committer: Christopher Tubbs Committed: Thu Mar 3 18:06:19 2016 -0500 -- pom.xml | 26 ++ 1 file changed, 26 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e52d5476/pom.xml --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: docs/src/main/latex/accumulo_user_manual/accumulo_user_manual.tex Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c283f4ac Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c283f4ac Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c283f4ac Branch: refs/heads/1.7 Commit: c283f4acbf80de9fb06a897525ab7bf66032d445 Parents: 69185ed 2f5c0e1 Author: Christopher Tubbs Authored: Fri Feb 12 17:45:32 2016 -0500 Committer: Christopher Tubbs Committed: Fri Feb 12 17:45:32 2016 -0500 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a2b15bfa Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a2b15bfa Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a2b15bfa Branch: refs/heads/1.7 Commit: a2b15bfa9937f7a2c9106323d4216c562f6d6e02 Parents: c85e04f d36e317 Author: Christopher Tubbs Authored: Wed Feb 10 13:02:23 2016 -0500 Committer: Christopher Tubbs Committed: Wed Feb 10 13:02:23 2016 -0500 -- test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a2b15bfa/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/81f1c7d8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/81f1c7d8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/81f1c7d8 Branch: refs/heads/1.7 Commit: 81f1c7d8047dd7eb5c6f7f1dd4dd12fcbb1ecf72 Parents: 301d91b 95f5aff Author: Christopher Tubbs Authored: Wed Feb 3 16:51:22 2016 -0500 Committer: Christopher Tubbs Committed: Wed Feb 3 16:51:22 2016 -0500 -- maven-plugin/pom.xml| 3 ++- maven-plugin/src/it/plugin-test/pom.xml | 7 +++ pom.xml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/81f1c7d8/maven-plugin/pom.xml -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/81f1c7d8/pom.xml -- diff --cc pom.xml index 7138c2f,663a79d..940478d --- a/pom.xml +++ b/pom.xml @@@ -794,9 -742,14 +794,9 @@@ - org.apache.maven.plugins - maven-plugin-plugin - 3.4 - - org.apache.rat apache-rat-plugin - 0.10 + 0.11 nbproject/**
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/301d91b4 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/301d91b4 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/301d91b4 Branch: refs/heads/1.7 Commit: 301d91b4047c152006f6feeb42c31b3d9db66a57 Parents: b639709 fbd2faf Author: Christopher Tubbs Authored: Wed Feb 3 14:07:32 2016 -0500 Committer: Christopher Tubbs Committed: Wed Feb 3 14:07:32 2016 -0500 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/301d91b4/pom.xml -- diff --cc pom.xml index bc2a909,8712b78..7138c2f --- a/pom.xml +++ b/pom.xml @@@ -126,18 -125,16 +126,18 @@@ -2.5.5 +3.0.3 1 - + 2.2.0 +3.1.0-incubating 3.1 -1.6 -8.1.15.v20140411 +9.1.5.v20140505 +1.7 +1.7 - 3.0.4 + 3.0.5 true 1.5
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: examples/simple/.gitignore fate/.gitignore maven-plugin/.gitignore minicluster/.gitignore pom.xml proxy/.gitignore server/tracer/.gitignore trace/.gitignore Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5596b016 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5596b016 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5596b016 Branch: refs/heads/1.7 Commit: 5596b016c145dc776fedb74ca51666ab68a630ec Parents: d4882a1 8c5607e Author: Josh Elser Authored: Fri Jan 29 12:14:37 2016 -0500 Committer: Josh Elser Committed: Fri Jan 29 12:14:37 2016 -0500 -- .gitignore | 3 +++ assemble/.gitignore| 3 +++ assemble/pom.xml | 3 +++ core/.gitignore| 5 +++-- core/pom.xml | 3 +++ docs/.gitignore| 3 +++ examples/simple/.gitignore | 3 +++ examples/simple/pom.xml| 3 +++ fate/.gitignore| 3 +++ maven-plugin/.gitignore| 3 +++ minicluster/.gitignore | 4 +++- pom.xml| 12 proxy/.gitignore | 4 +++- server/base/.gitignore | 3 +++ server/gc/.gitignore | 3 +++ server/master/.gitignore | 3 +++ server/monitor/.gitignore | 3 +++ server/monitor/pom.xml | 3 +++ server/native/.gitignore | 3 +++ server/tracer/.gitignore | 3 +++ server/tserver/.gitignore | 3 +++ server/tserver/pom.xml | 3 +++ shell/.gitignore | 4 +++- shell/pom.xml | 17 + start/.gitignore | 4 test/.gitignore| 4 test/pom.xml | 3 +++ trace/.gitignore | 3 +++ 28 files changed, 109 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/.gitignore -- diff --cc .gitignore index 56204d2,f97b5ca..e77a822 --- a/.gitignore +++ b/.gitignore @@@ -23,3 -23,7 +23,6 @@@ /.pydevproject /.idea /*.iml + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/assemble/.gitignore -- diff --cc assemble/.gitignore index 56204d2,f97b5ca..e77a822 --- a/assemble/.gitignore +++ b/assemble/.gitignore @@@ -23,3 -23,7 +23,6 @@@ /.pydevproject /.idea /*.iml + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/assemble/pom.xml -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/core/.gitignore -- diff --cc core/.gitignore index 8847bdd,8c9981c..e77a822 --- a/core/.gitignore +++ b/core/.gitignore @@@ -23,5 -23,8 +23,6 @@@ /.pydevproject /.idea /*.iml - /target/ --/bin/ + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/core/pom.xml -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/docs/.gitignore -- diff --cc docs/.gitignore index 56204d2,f97b5ca..e77a822 --- a/docs/.gitignore +++ b/docs/.gitignore @@@ -23,3 -23,7 +23,6 @@@ /.pydevproject /.idea /*.iml + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/examples/simple/.gitignore -- diff --cc examples/simple/.gitignore index 56204d2,8c9981c..e77a822 --- a/examples/simple/.gitignore +++ b/examples/simple/.gitignore @@@ -23,3 -23,8 +23,6 @@@ /.pydevproject /.idea /*.iml -/bin/ + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/examples/simple/pom.xml -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/fate/.gitignore -- diff --cc fate/.gitignore index 56204d2,8c9981c..e77a822 --- a/fate/.gitignore +++ b/fate/.gitignore @@@ -23,3 -23,8 +23,6 @@@ /.pydevproject /.idea /*.iml -/bin/ + /nbproject/ + /nbactions.xml + /nb-configuration.xml - http://git-wip-us.apache.org/repos/asf/accumulo/blob/5596b016/maven-plugin/.gitignore -- diff --cc maven-plugin/.gitignore index 56204d2,0a396d4..e77a822 --- a
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0faf8b9c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0faf8b9c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0faf8b9c Branch: refs/heads/1.7 Commit: 0faf8b9c0619bdb203be704c7a09547a884fd58b Parents: bd9969f ff1e003 Author: Christopher Tubbs Authored: Wed Jan 27 18:01:32 2016 -0500 Committer: Christopher Tubbs Committed: Wed Jan 27 18:01:32 2016 -0500 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a4a1d6eb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a4a1d6eb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a4a1d6eb Branch: refs/heads/1.7 Commit: a4a1d6eb3d810201cfe7e2d72cea475bd952055e Parents: 94f4a19 8c6866e Author: Josh Elser Authored: Wed Jan 13 14:54:15 2016 -0500 Committer: Josh Elser Committed: Wed Jan 13 14:54:15 2016 -0500 -- .../java/org/apache/accumulo/tserver/session/ScanSession.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a4a1d6eb/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ScanSession.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/session/ScanSession.java index 743f4d3,000..36a86ad mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ScanSession.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ScanSession.java @@@ -1,72 -1,0 +1,74 @@@ +/* + * 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.accumulo.tserver.session; + +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.apache.accumulo.core.data.Column; +import org.apache.accumulo.core.data.impl.KeyExtent; +import org.apache.accumulo.core.data.thrift.IterInfo; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.thrift.TCredentials; +import org.apache.accumulo.core.util.Stat; +import org.apache.accumulo.tserver.scan.ScanTask; +import org.apache.accumulo.tserver.tablet.ScanBatch; +import org.apache.accumulo.tserver.tablet.Scanner; + +public class ScanSession extends Session { + public final Stat nbTimes = new Stat(); + public final KeyExtent extent; + public final Set columnSet; + public final List ssiList; + public final Map> ssio; + public final Authorizations auths; + public final AtomicBoolean interruptFlag = new AtomicBoolean(); + public long entriesReturned = 0; + public long batchCount = 0; + public volatile ScanTask nextBatchTask; + public Scanner scanner; + public final long readaheadThreshold; + + public ScanSession(TCredentials credentials, KeyExtent extent, Set columnSet, List ssiList, Map> ssio, + Authorizations authorizations, long readaheadThreshold) { +super(credentials); +this.extent = extent; +this.columnSet = columnSet; +this.ssiList = ssiList; +this.ssio = ssio; +this.auths = authorizations; +this.readaheadThreshold = readaheadThreshold; + } + + @Override + public boolean cleanup() { ++final boolean ret; +try { + if (nextBatchTask != null) +nextBatchTask.cancel(true); +} finally { + if (scanner != null) - return scanner.close(); ++ret = scanner.close(); + else - return true; ++ret = true; +} ++return ret; + } + +}
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java test/src/test/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/65628282 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/65628282 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/65628282 Branch: refs/heads/1.7 Commit: 656282825ad0eb4ee51052e71492a3d3fd5c1f02 Parents: 642add8 46ad836 Author: Josh Elser Authored: Tue Jan 12 00:24:24 2016 -0500 Committer: Josh Elser Committed: Tue Jan 12 00:24:24 2016 -0500 -- .../org/apache/accumulo/core/conf/Property.java | 6 +- .../tserver/session/ConditionalSession.java | 3 +- .../tserver/session/MultiScanSession.java | 4 +- .../accumulo/tserver/session/ScanSession.java | 6 +- .../accumulo/tserver/session/Session.java | 4 +- .../tserver/session/SessionManager.java | 61 ++- .../apache/accumulo/tserver/tablet/Scanner.java | 68 +-- .../test/functional/ScanSessionTimeOutIT.java | 15 +- .../test/functional/SessionBlockVerifyIT.java | 176 +++ 9 files changed, 306 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/core/src/main/java/org/apache/accumulo/core/conf/Property.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java index cd5e617,000..138f558 mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/ConditionalSession.java @@@ -1,44 -1,0 +1,45 @@@ +/* + * 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.accumulo.tserver.session; + +import java.util.concurrent.atomic.AtomicBoolean; + +import org.apache.accumulo.core.client.Durability; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.thrift.TCredentials; + +public class ConditionalSession extends Session { + public final TCredentials credentials; + public final Authorizations auths; + public final String tableId; + public final AtomicBoolean interruptFlag = new AtomicBoolean(); + public final Durability durability; + + public ConditionalSession(TCredentials credentials, Authorizations authorizations, String tableId, Durability durability) { +super(credentials); +this.credentials = credentials; +this.auths = authorizations; +this.tableId = tableId; +this.durability = durability; + } + + @Override - public void cleanup() { ++ public boolean cleanup() { +interruptFlag.set(true); ++return true; + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/65628282/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java index b326e10,000..2fd590c mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/MultiScanSession.java @@@ -1,63 -1,0 +1,65 @@@ +/* + * 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 th
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: pom.xml Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/642add8c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/642add8c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/642add8c Branch: refs/heads/1.7 Commit: 642add8cc6710ec5e396bd9e690e058ed8fe1837 Parents: 78659a6 567f52f Author: Christopher Tubbs Authored: Mon Jan 11 19:57:51 2016 -0500 Committer: Christopher Tubbs Committed: Mon Jan 11 19:57:51 2016 -0500 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/642add8c/pom.xml -- diff --cc pom.xml index 0fa003a,de8302c..3fc5d96 --- a/pom.xml +++ b/pom.xml @@@ -654,8 -625,8 +654,8 @@@ true clean deploy clean verify - @{project.version} + rel/@{project.version} - seal-jars,skip-findbugs,skip-plugin-its-with-skipTests + apache-release,move-source-tarball,seal-jars,skip-findbugs,skip-plugin-its-with-skipTests false false true
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/78659a61 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/78659a61 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/78659a61 Branch: refs/heads/1.7 Commit: 78659a61fca3739a35e709f5e34415c92767fd2a Parents: d55fef7 8669215 Author: Josh Elser Authored: Sun Jan 10 13:20:06 2016 -0500 Committer: Josh Elser Committed: Sun Jan 10 13:20:06 2016 -0500 -- assemble/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/78659a61/assemble/build.sh --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d55fef70 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d55fef70 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d55fef70 Branch: refs/heads/1.7 Commit: d55fef70c7801f7481e255b8e5ed91242b8a06aa Parents: 0ccba14 e85f14b Author: Christopher Tubbs Authored: Sat Jan 9 01:56:25 2016 -0500 Committer: Christopher Tubbs Committed: Sat Jan 9 01:56:25 2016 -0500 -- pom.xml | 361 +++ 1 file changed, 188 insertions(+), 173 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d55fef70/pom.xml -- diff --cc pom.xml index 644f506,d51f406..0fa003a --- a/pom.xml +++ b/pom.xml @@@ -717,182 -671,14 +717,9 @@@ org.codehaus.mojo exec-maven-plugin - 1.2.1 - - - org.codehaus.mojo - latex-maven-plugin - 1.1 + 1.4.0 - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-plugin-plugin - [3.2,) - - helpmojo - descriptor - - - - - - - - - com.googlecode.maven-java-formatter-plugin - maven-java-formatter-plugin - [0.4,) - - format - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - [2.13,) - - check - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - copy-dependencies - - - - - - - - - org.apache.maven.plugins - maven-remote-resources-plugin - [1.0,) - - process - - - - - - - - - org.apache.rat - apache-rat-plugin - [0.8,) - - check - - - - - - - - - org.codehaus.mojo - native-maven-plugin - [1.0-alpha-7,) - - compile - initialize - javah - link - unzipinc - - - - - - - - - org.codehaus.mojo - exec-maven-plugin - [1.0,) - - exec - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - [1.0,) - - enforce - - - - - - - - - org.apache.maven.plugins - maven-invoker-plugin - [1.7,) - - install - - - - - -
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: docs/src/main/asciidoc/chapters/clients.txt Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d505843e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d505843e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d505843e Branch: refs/heads/1.7 Commit: d505843e1fe2cf7e2abe947bad166a37693a441c Parents: 0e9f208 05811af Author: Christopher Tubbs Authored: Wed Jan 6 15:41:00 2016 -0500 Committer: Christopher Tubbs Committed: Wed Jan 6 15:41:00 2016 -0500 -- docs/src/main/asciidoc/chapters/clients.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d505843e/docs/src/main/asciidoc/chapters/clients.txt -- diff --cc docs/src/main/asciidoc/chapters/clients.txt index 2bae4ed,000..53abd03 mode 100644,00..100644 --- a/docs/src/main/asciidoc/chapters/clients.txt +++ b/docs/src/main/asciidoc/chapters/clients.txt @@@ -1,391 -1,0 +1,391 @@@ +// 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. + +== Writing Accumulo Clients + +=== Running Client Code + +There are multiple ways to run Java code that uses Accumulo. Below is a list +of the different ways to execute client code. + +* using java executable +* using the accumulo script +* using the tool script + +In order to run client code written to run against Accumulo, you will need to +include the jars that Accumulo depends on in your classpath. Accumulo client +code depends on Hadoop and Zookeeper. For Hadoop add the hadoop client jar, all +of the jars in the Hadoop lib directory, and the conf directory to the +classpath. For recent Zookeeper versions, you only need to add the Zookeeper jar, and not +what is in the Zookeeper lib directory. You can run the following command on a +configured Accumulo system to see what its using for its classpath. + + $ACCUMULO_HOME/bin/accumulo classpath + +Another option for running your code is to put a jar file in ++$ACCUMULO_HOME/lib/ext+. After doing this you can use the accumulo +script to execute your code. For example if you create a jar containing the +class +com.foo.Client+ and placed that in +lib/ext+, then you could use the command ++$ACCUMULO_HOME/bin/accumulo com.foo.Client+ to execute your code. + +If you are writing map reduce job that access Accumulo, then you can use the +bin/tool.sh script to run those jobs. See the map reduce example. + +=== Connecting + +All clients must first identify the Accumulo instance to which they will be +communicating. Code to do this is as follows: + +[source,java] + +String instanceName = "myinstance"; +String zooServers = "zooserver-one,zooserver-two" +Instance inst = new ZooKeeperInstance(instanceName, zooServers); + +Connector conn = inst.getConnector("user", new PasswordToken("passwd")); + + +The PasswordToken is the most common implementation of an \texttt{AuthenticationToken}. +This general interface allow authentication as an Accumulo user to come from +a variety of sources or means. The CredentialProviderToken leverages the Hadoop +CredentialProviders (new in Hadoop 2.6). + +For example, the CredentialProviderToken can be used in conjunction with a Java +KeyStore to alleviate passwords stored in cleartext. When stored in HDFS, a single +KeyStore can be used across an entire instance. Be aware that KeyStores stored on +the local filesystem must be made available to all nodes in the Accumulo cluster. + +[source,java] + +KerberosToken token = new KerberosToken(); +Connector conn = inst.getConnector(token.getPrincipal(), token); + + +The KerberosToken can be provided to use the authentication provided by Kerberos. +Using Kerberos requires external setup and additional configuration, but provides +a single point of authentication through HDFS, YARN and ZooKeeper and allowing +for password-less authentication with Accumulo. + +
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/acf68ad5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/acf68ad5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/acf68ad5 Branch: refs/heads/1.7 Commit: acf68ad5110edb4e9ab38ca097aa0a9e34d8e370 Parents: 3cb1e7c fb46488 Author: Josh Elser Authored: Wed Dec 30 21:15:30 2015 -0500 Committer: Josh Elser Committed: Wed Dec 30 21:15:30 2015 -0500 -- .../accumulo/core/client/admin/TableOperations.java | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/acf68ad5/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3cb1e7c0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3cb1e7c0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3cb1e7c0 Branch: refs/heads/1.7 Commit: 3cb1e7c0269ec5e22cc81ae96146334194e1575d Parents: e4ccbbf 401350f Author: Josh Elser Authored: Wed Dec 30 20:56:16 2015 -0500 Committer: Josh Elser Committed: Wed Dec 30 20:56:16 2015 -0500 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76d9ed76 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76d9ed76 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76d9ed76 Branch: refs/heads/1.7 Commit: 76d9ed7691fe257cd54fca565c2f3b2f79b7269f Parents: a25ec8e 2a2bfbb Author: Josh Elser Authored: Wed Dec 30 19:10:44 2015 -0500 Committer: Josh Elser Committed: Wed Dec 30 19:51:40 2015 -0500 -- .../accumulo/fate/zookeeper/ZooCache.java | 319 +++ 1 file changed, 190 insertions(+), 129 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76d9ed76/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java -- diff --cc fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java index f043d83,b30bb15..81985d7 --- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java +++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java @@@ -28,7 -28,12 +28,11 @@@ import java.util.ConcurrentModification import java.util.HashMap; import java.util.Iterator; import java.util.List; + import java.util.concurrent.locks.Lock; + import java.util.concurrent.locks.LockSupport; + import java.util.concurrent.locks.ReadWriteLock; + import java.util.concurrent.locks.ReentrantReadWriteLock; -import org.apache.log4j.Logger; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.KeeperException.Code; import org.apache.zookeeper.WatchedEvent; @@@ -44,16 -47,20 +48,20 @@@ import com.google.common.annotations.Vi * A cache for values stored in ZooKeeper. Values are kept up to date as they change. */ public class ZooCache { - private static final Logger log = Logger.getLogger(ZooCache.class); + private static final Logger log = LoggerFactory.getLogger(ZooCache.class); - private ZCacheWatcher watcher = new ZCacheWatcher(); - private Watcher externalWatcher = null; + private final ZCacheWatcher watcher = new ZCacheWatcher(); + private final Watcher externalWatcher; - private HashMap cache; - private HashMap statCache; - private HashMap> childrenCache; + private final ReadWriteLock cacheLock = new ReentrantReadWriteLock(false); + private final Lock cacheWriteLock = cacheLock.writeLock(); + private final Lock cacheReadLock = cacheLock.readLock(); - private ZooReader zReader; + private final HashMap cache; + private final HashMap statCache; + private final HashMap> childrenCache; + + private final ZooReader zReader; private ZooKeeper getZooKeeper() { return zReader.getZooKeeper(); @@@ -247,81 -267,109 +268,107 @@@ * status object to populate * @return path data, or null if non-existent */ - public synchronized byte[] get(final String zPath, Stat stat) { - ZooRunnable zr = new ZooRunnable() { + public byte[] get(final String zPath, final Stat status) { + ZooRunnable zr = new ZooRunnable() { @Override - public void run(ZooKeeper zooKeeper) throws KeeperException, InterruptedException { - - if (cache.containsKey(zPath)) - return; - - // The following call to exists() is important, since we are caching that a node does not exist. Once the node comes into existence, it will be added to - // the cache. But this notification of a node coming into existence will only be given if exists() was previously called. - // - // If the call to exists() is bypassed and only getData() is called with a special case that looks for Code.NONODE in the KeeperException, then - // non-existence can not be cached. - Stat stat = zooKeeper.exists(zPath, watcher); - - byte[] data = null; - - if (stat == null) { - if (log.isTraceEnabled()) - log.trace("zookeeper did not contain " + zPath); - } else { - try { - data = zooKeeper.getData(zPath, watcher, stat); - } catch (KeeperException.BadVersionException e1) { - throw new ConcurrentModificationException(); - } catch (KeeperException.NoNodeException e2) { - throw new ConcurrentModificationException(); + public byte[] run(ZooKeeper zooKeeper) throws KeeperException, InterruptedException { + Stat stat = null; + cacheReadLock.lock(); + try { + if (cache.containsKey(zPath)) { + stat = statCache.get(zPath); + copyStats(status, stat); + return cache.get(zPath); } - if (log.isTraceEnabled()) - l
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: docs/src/main/latex/accumulo_user_manual/chapters/administration.tex Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/14e88e4b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/14e88e4b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/14e88e4b Branch: refs/heads/1.7 Commit: 14e88e4ba6fef601bca2fa1307b654173315f356 Parents: 5efa0bd 97a92a0 Author: Josh Elser Authored: Mon Dec 28 13:37:16 2015 -0500 Committer: Josh Elser Committed: Mon Dec 28 13:37:16 2015 -0500 -- .../main/asciidoc/chapters/administration.txt | 40 1 file changed, 40 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/14e88e4b/docs/src/main/asciidoc/chapters/administration.txt -- diff --cc docs/src/main/asciidoc/chapters/administration.txt index 0a29711,000..919ec8f mode 100644,00..100644 --- a/docs/src/main/asciidoc/chapters/administration.txt +++ b/docs/src/main/asciidoc/chapters/administration.txt @@@ -1,1106 -1,0 +1,1146 @@@ +// 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. + +== Administration + +=== Hardware + +Because we are running essentially two or three systems simultaneously layered +across the cluster: HDFS, Accumulo and MapReduce, it is typical for hardware to +consist of 4 to 8 cores, and 8 to 32 GB RAM. This is so each running process can have +at least one core and 2 - 4 GB each. + +One core running HDFS can typically keep 2 to 4 disks busy, so each machine may +typically have as little as 2 x 300GB disks and as much as 4 x 1TB or 2TB disks. + +It is possible to do with less than this, such as with 1u servers with 2 cores and 4GB +each, but in this case it is recommended to only run up to two processes per +machine -- i.e. DataNode and TabletServer or DataNode and MapReduce worker but +not all three. The constraint here is having enough available heap space for all the +processes on a machine. + +=== Network + +Accumulo communicates via remote procedure calls over TCP/IP for both passing +data and control messages. In addition, Accumulo uses HDFS clients to +communicate with HDFS. To achieve good ingest and query performance, sufficient +network bandwidth must be available between any two machines. + +In addition to needing access to ports associated with HDFS and ZooKeeper, Accumulo will +use the following default ports. Please make sure that they are open, or change +their value in conf/accumulo-site.xml. + +.Accumulo default ports +[width="75%",cols=">,^2,^2"] +[options="header"] +| +|Port | Description | Property Name +|4445 | Shutdown Port (Accumulo MiniCluster) | n/a +|4560 | Accumulo monitor (for centralized log display) | monitor.port.log4j +|9997 | Tablet Server | tserver.port.client +| | Master Server | master.port.client +|12234 | Accumulo Tracer | trace.port.client +|42424 | Accumulo Proxy Server | n/a +|50091 | Accumulo GC | gc.port.client +|50095 | Accumulo HTTP monitor | monitor.port.client +|10001 | Master Replication service | master.replication.coordinator.port +|10002 | TabletServer Replication service | replication.receipt.service.port +| + +In addition, the user can provide +0+ and an ephemeral port will be chosen instead. This +ephemeral port is likely to be unique and not already bound. Thus, configuring ports to +use +0+ instead of an explicit value, should, in most cases, work around any issues of +running multiple distinct Accumulo instances (or any other process which tries to use the +same default ports) on the same hardware. + +=== Installation +Choose a directory for the Accumulo installation. This directory will be referenced +by the environment variable +$ACCUMULO_HOME+. Run the following: + + $ tar xzf accumulo-1.6.0-bin.tar.gz# unpack to subdirectory + $ mv accumulo-1.6.0 $ACCUMULO_HOME # move to desired location + +Repeat this step at each mac
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/904e957c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/904e957c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/904e957c Branch: refs/heads/1.7 Commit: 904e957c49e92eee2961009305bc62c56db01a67 Parents: f85717c ef8c1ca Author: Josh Elser Authored: Wed Dec 9 11:51:02 2015 -0500 Committer: Josh Elser Committed: Wed Dec 9 11:51:02 2015 -0500 -- fate/src/main/java/org/apache/accumulo/fate/Fate.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/904e957c/fate/src/main/java/org/apache/accumulo/fate/Fate.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f85717cb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f85717cb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f85717cb Branch: refs/heads/1.7 Commit: f85717cbdbedf9d705bc2c246a2fbe684a63d336 Parents: afa475d 4eb8085 Author: Josh Elser Authored: Fri Dec 4 16:24:11 2015 -0500 Committer: Josh Elser Committed: Fri Dec 4 16:24:11 2015 -0500 -- .../accumulo/core/rpc/TTimeoutTransport.java| 21 ++-- 1 file changed, 19 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f85717cb/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java -- diff --cc core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java index 8c23555,000..400d90a mode 100644,00..100644 --- a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java +++ b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java @@@ -1,60 -1,0 +1,77 @@@ +/* + * 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.accumulo.core.rpc; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Method; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketAddress; +import java.nio.channels.spi.SelectorProvider; + +import org.apache.hadoop.net.NetUtils; +import org.apache.thrift.transport.TIOStreamTransport; +import org.apache.thrift.transport.TTransport; + +import com.google.common.net.HostAndPort; + +public class TTimeoutTransport { + ++ private static volatile Method GET_INPUT_STREAM_METHOD = null; ++ ++ private static Method getNetUtilsInputStreamMethod() { ++if (null == GET_INPUT_STREAM_METHOD) { ++ synchronized (TTimeoutTransport.class) { ++if (null == GET_INPUT_STREAM_METHOD) { ++ try { ++GET_INPUT_STREAM_METHOD = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); ++ } catch (Exception e) { ++throw new RuntimeException(e); ++ } ++} ++ } ++} ++ ++return GET_INPUT_STREAM_METHOD; ++ } ++ + private static InputStream getInputStream(Socket socket, long timeout) { +try { - Method m = NetUtils.class.getMethod("getInputStream", Socket.class, Long.TYPE); - return (InputStream) m.invoke(null, socket, timeout); ++ return (InputStream) getNetUtilsInputStreamMethod().invoke(null, socket, timeout); +} catch (Exception e) { + throw new RuntimeException(e); +} + } + + public static TTransport create(HostAndPort addr, long timeoutMillis) throws IOException { +return create(new InetSocketAddress(addr.getHostText(), addr.getPort()), timeoutMillis); + } + + public static TTransport create(SocketAddress addr, long timeoutMillis) throws IOException { +Socket socket = SelectorProvider.provider().openSocketChannel().socket(); +socket.setSoLinger(false, 0); +socket.setTcpNoDelay(true); +socket.connect(addr); +InputStream input = new BufferedInputStream(getInputStream(socket, timeoutMillis), 1024 * 10); +OutputStream output = new BufferedOutputStream(NetUtils.getOutputStream(socket, timeoutMillis), 1024 * 10); +return new TIOStreamTransport(input, output); + } +}
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c20996d8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c20996d8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c20996d8 Branch: refs/heads/1.7 Commit: c20996d83ee0fd64c864d3af1c1ac9deee5ac8d5 Parents: 3aa9d30 4d952ac Author: Josh Elser Authored: Thu Dec 3 16:48:59 2015 -0500 Committer: Josh Elser Committed: Thu Dec 3 16:48:59 2015 -0500 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0e3af1e8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0e3af1e8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0e3af1e8 Branch: refs/heads/1.7 Commit: 0e3af1e8560b0a28a4415f8da38a561965d552dc Parents: e35e189 bd8cf5e Author: Christopher Tubbs Authored: Thu Dec 3 15:36:49 2015 -0500 Committer: Christopher Tubbs Committed: Thu Dec 3 15:36:49 2015 -0500 -- .../src/main/java/org/apache/accumulo/proxy/Proxy.java | 2 +- .../java/org/apache/accumulo/server/rpc/RpcWrapper.java | 12 ++-- .../org/apache/accumulo/server/rpc/RpcWrapperTest.java | 9 +++-- .../org/apache/accumulo/gc/SimpleGarbageCollector.java | 2 +- .../main/java/org/apache/accumulo/master/Master.java| 4 ++-- .../java/org/apache/accumulo/tserver/TabletServer.java | 4 ++-- 6 files changed, 15 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0e3af1e8/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -- diff --cc proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java index ca39786,53221e0..87e2c58 --- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java +++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java @@@ -161,113 -117,38 +161,113 @@@ public class Proxy implements KeywordEx Class protoFactoryClass = Class.forName(opts.prop.getProperty("protocolFactory", TCompactProtocol.Factory.class.getName())) .asSubclass(TProtocolFactory.class); +TProtocolFactory protoFactory = protoFactoryClass.newInstance(); int port = Integer.parseInt(opts.prop.getProperty("port")); -TServer server = createProxyServer(AccumuloProxy.class, ProxyServer.class, port, protoFactoryClass, opts.prop); -server.serve(); +String hostname = opts.prop.getProperty(THRIFT_SERVER_HOSTNAME, THRIFT_SERVER_HOSTNAME_DEFAULT); +HostAndPort address = HostAndPort.fromParts(hostname, port); +ServerAddress server = createProxyServer(address, protoFactory, opts.prop); +// Wait for the server to come up +while (!server.server.isServing()) { + Thread.sleep(100); +} +log.info("Proxy server started on " + server.getAddress()); +while (server.server.isServing()) { + Thread.sleep(1000); +} + } + + public static void main(String[] args) throws Exception { +new Proxy().execute(args); } - public static TServer createProxyServer(Class api, Class implementor, final int port, Class protoClass, - Properties properties) throws Exception { -Class proxyIfaceClass = Class.forName(api.getName() + "$Iface"); -return createProxyServer(proxyIfaceClass, api, implementor, port, protoClass, properties); + public static ServerAddress createProxyServer(HostAndPort address, TProtocolFactory protocolFactory, Properties properties) throws Exception { +return createProxyServer(address, protocolFactory, properties, ClientConfiguration.loadDefault()); } - private static > TServer createProxyServer(final Class proxyIfaceClass, Class api, final Class implementor, - final int port, final Class protoClass, final Properties properties) throws Exception { -@SuppressWarnings("unchecked") -Class proxyProcClass = (Class) Class.forName(api.getName() + "$Processor"); - -// create the implementor -@SuppressWarnings("unchecked") -I impl = (I) implementor.getConstructor(Properties.class).newInstance(properties); - -Constructor proxyProcConstructor = proxyProcClass.getConstructor(proxyIfaceClass); -P processor = proxyProcConstructor.newInstance(RpcWrapper.service(impl, proxyProcConstructor.newInstance(impl))); - -TNonblockingServerSocket socket = new TNonblockingServerSocket(port); -THsHaServer.Args args = new THsHaServer.Args(socket); -args.processor(processor); -final long maxFrameSize = AccumuloConfiguration.getMemoryInBytes(properties.getProperty("maxFrameSize", "16M")); -if (maxFrameSize > Integer.MAX_VALUE) - throw new RuntimeException(maxFrameSize + " is larger than MAX_INT"); -args.transportFactory(new TFramedTransport.Factory((int) maxFrameSize)); -args.protocolFactory(protoClass.newInstance()); -args.maxReadBufferBytes = maxFrameSize; -return new THsHaServer(args); + public static ServerAddress createProxyServer(HostAndPort address, TProtocolFactory protocolFactory, Properties properties, ClientConfiguration clientConf) + throws Exception { +final int numThreads = Integer.parseInt(properties.getProperty(THRIFT_THREAD_POOL_SIZE_KEY, THRIFT_THREAD_POOL_SIZE_DEFAULT)); +final long maxFrameS
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: fate/src/main/java/org/apache/accumulo/fate/Fate.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1853d088 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1853d088 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1853d088 Branch: refs/heads/1.7 Commit: 1853d088e855a0c3f9345f6509c292814dcc61bb Parents: 5947b42 e82c3f3 Author: Josh Elser Authored: Sat Nov 21 17:28:15 2015 -0500 Committer: Josh Elser Committed: Sat Nov 21 17:28:15 2015 -0500 -- fate/src/main/java/org/apache/accumulo/fate/Fate.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1853d088/fate/src/main/java/org/apache/accumulo/fate/Fate.java -- diff --cc fate/src/main/java/org/apache/accumulo/fate/Fate.java index cf2ab73,52c7b2f..8a3aaf7 --- a/fate/src/main/java/org/apache/accumulo/fate/Fate.java +++ b/fate/src/main/java/org/apache/accumulo/fate/Fate.java @@@ -41,7 -37,8 +41,8 @@@ public class Fate private static final String EXCEPTION_PROP = "exception"; private static final String RETURN_PROP = "return"; - final private static Logger log = Logger.getLogger(Fate.class); - private final Logger runnerLog = Logger.getLogger(TransactionRunner.class); + final private static Logger log = LoggerFactory.getLogger(Fate.class); ++ private final Logger runnerLog = LoggerFactory.getLogger(TransactionRunner.class); private TStore store; private T environment;
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3ae43364 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3ae43364 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3ae43364 Branch: refs/heads/1.7 Commit: 3ae43364b3472c194e003dcb81b95ecca87aa70d Parents: dfa734f 1619ae4 Author: Josh Elser Authored: Wed Oct 28 11:15:58 2015 -0400 Committer: Josh Elser Committed: Wed Oct 28 11:15:58 2015 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/dfa734f8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/dfa734f8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/dfa734f8 Branch: refs/heads/1.7 Commit: dfa734f842f5466da9eb78848f3cae83b7123153 Parents: a1d3c92 b1510fd Author: Josh Elser Authored: Mon Oct 26 00:13:59 2015 -0400 Committer: Josh Elser Committed: Mon Oct 26 00:13:59 2015 -0400 -- .../src/main/java/org/apache/accumulo/monitor/Monitor.java| 3 --- 1 file changed, 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/dfa734f8/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java -- diff --cc server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java index 9e01abe,77e2400..24e2e3f --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java @@@ -16,9 -16,8 +16,8 @@@ */ package org.apache.accumulo.monitor; -import static com.google.common.base.Charsets.UTF_8; +import static java.nio.charset.StandardCharsets.UTF_8; - import java.net.InetAddress; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap;
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a4bc71b4 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a4bc71b4 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a4bc71b4 Branch: refs/heads/1.7 Commit: a4bc71b4d6d12a4c7a8f1c6f70e83a1d5dc70e44 Parents: 89d69f6 ddace50 Author: Josh Elser Authored: Wed Oct 21 13:46:26 2015 -0400 Committer: Josh Elser Committed: Wed Oct 21 13:46:26 2015 -0400 -- .../org/apache/accumulo/test/NamespacesIT.java | 99 +++- 1 file changed, 77 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a4bc71b4/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8532f075 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8532f075 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8532f075 Branch: refs/heads/1.7 Commit: 8532f075938d8063364a066950d43dad520b9d66 Parents: 7b5ad53 c869751 Author: Josh Elser Authored: Sat Oct 3 18:17:52 2015 -0400 Committer: Josh Elser Committed: Sat Oct 3 18:17:52 2015 -0400 -- .../org/apache/accumulo/core/file/blockfile/cache/BlockCache.java | 2 -- .../org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java | 2 -- .../accumulo/core/file/blockfile/cache/CachedBlockQueue.java | 2 -- .../org/apache/accumulo/core/file/blockfile/cache/ClassSize.java | 2 -- .../org/apache/accumulo/core/file/blockfile/cache/HeapSize.java| 2 -- .../apache/accumulo/core/file/blockfile/cache/LruBlockCache.java | 2 -- .../accumulo/core/file/blockfile/cache/TestCachedBlockQueue.java | 2 -- .../accumulo/core/file/blockfile/cache/TestLruBlockCache.java | 2 -- 8 files changed, 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlockQueue.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/ClassSize.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/HeapSize.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8532f075/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7b5ad53b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7b5ad53b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7b5ad53b Branch: refs/heads/1.7 Commit: 7b5ad53bcf67e455f463bbcf7e449a9ca3a5e9db Parents: 82f27fd 25f74cd Author: Josh Elser Authored: Sat Oct 3 18:09:55 2015 -0400 Committer: Josh Elser Committed: Sat Oct 3 18:09:55 2015 -0400 -- assemble/bin-LICENSE | 76 --- 1 file changed, 76 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7b5ad53b/assemble/bin-LICENSE --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 This merges ACCUMULO-4015 commits with -s ours, since that fix only applies to the Hadoop 1 profile for Accumulo versions 1.6.x and does not apply to 1.7 and later, which only support Hadoop 2. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/38f36e26 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/38f36e26 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/38f36e26 Branch: refs/heads/1.7 Commit: 38f36e26e31877d24c833ea1c090408635400816 Parents: f592180 e24bd36 Author: Christopher Tubbs Authored: Thu Oct 1 12:45:58 2015 -0400 Committer: Christopher Tubbs Committed: Thu Oct 1 12:45:58 2015 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7c94ea0d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7c94ea0d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7c94ea0d Branch: refs/heads/1.7 Commit: 7c94ea0da37620f540444a263dad737f123642bd Parents: 6558b4a 6c4df76 Author: Josh Elser Authored: Sat Sep 12 18:47:58 2015 -0400 Committer: Josh Elser Committed: Sat Sep 12 18:47:58 2015 -0400 -- assemble/pom.xml| 14 .../src/main/appended-resources/META-INF/NOTICE | 9 +++ .../main/appended-resources/META-INF/LICENSE| 74 .../main/appended-resources/META-INF/LICENSE| 74 .../src/main/appended-resources/META-INF/NOTICE | 9 --- 5 files changed, 97 insertions(+), 83 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/7c94ea0d/assemble/pom.xml -- diff --cc assemble/pom.xml index 9258d87,35d974a..87c0ed4 --- a/assemble/pom.xml +++ b/assemble/pom.xml @@@ -170,30 -162,22 +170,44 @@@ + + + + org.apache.rat + apache-rat-plugin + + + bin-LICENSE + bin-NOTICE + + + + + +org.apache.maven.plugins +maven-dependency-plugin + + + +generate-dependencies-raw + + list + +compile + + ${project.build.directory}/dependencies.raw.txt + false + true + + commons-math,commons-vfs2,gson,guava,htrace-core,javax.servlet-api,jcommander,jetty-http,jetty-io,jetty-security,jetty-server,jetty-servlet,jetty-util,jline,libthrift,protobuf-java,slf4j-api,slf4j-log4j12 + true + + + + + org.codehaus.mojo exec-maven-plugin
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5ccb54ea Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5ccb54ea Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5ccb54ea Branch: refs/heads/1.7 Commit: 5ccb54eae9bc98aac6ccf8e2ad704a836722118b Parents: af5a37d 0a8ec61 Author: Josh Elser Authored: Mon Aug 24 13:03:12 2015 -0400 Committer: Josh Elser Committed: Mon Aug 24 13:03:12 2015 -0400 -- .../src/main/java/org/apache/accumulo/monitor/Monitor.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5ccb54ea/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/af5a37d5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/af5a37d5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/af5a37d5 Branch: refs/heads/1.7 Commit: af5a37d5b303ff99606b13bdafe6953618ca6289 Parents: d196987 d4c8fa6 Author: Josh Elser Authored: Mon Aug 24 00:46:54 2015 -0400 Committer: Josh Elser Committed: Mon Aug 24 01:06:53 2015 -0400 -- .../test/BulkImportSequentialRowsIT.java| 112 +++ 1 file changed, 112 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/af5a37d5/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java index 000,9a3f489..3fee282 mode 00,100644..100644 --- a/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/BulkImportSequentialRowsIT.java @@@ -1,0 -1,112 +1,112 @@@ + /* + * 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.accumulo.test; + + import static org.junit.Assert.assertEquals; + import static org.junit.Assert.assertTrue; + + import java.util.SortedSet; + import java.util.TreeSet; + + import org.apache.accumulo.core.client.admin.TableOperations; + import org.apache.accumulo.core.conf.DefaultConfiguration; + import org.apache.accumulo.core.data.Key; + import org.apache.accumulo.core.data.Value; + import org.apache.accumulo.core.file.FileOperations; + import org.apache.accumulo.core.file.FileSKVWriter; + import org.apache.accumulo.core.security.Authorizations; + import org.apache.accumulo.harness.AccumuloClusterIT; + import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; + import org.apache.hadoop.conf.Configuration; + import org.apache.hadoop.fs.FileSystem; + import org.apache.hadoop.fs.Path; + import org.apache.hadoop.fs.RawLocalFileSystem; + import org.apache.hadoop.io.Text; + import org.junit.Test; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + + import com.google.common.collect.Iterables; + + // ACCUMULO-3967 + public class BulkImportSequentialRowsIT extends AccumuloClusterIT { + private static final Logger log = LoggerFactory.getLogger(BulkImportSequentialRowsIT.class); + + @Override + public int defaultTimeoutSeconds() { + return 60; + } + + @Override + public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { + // Need more than one tserver + cfg.setNumTservers(2); + + // use raw local file system so walogs sync and flush will work + hadoopCoreSite.set("fs.file.impl", RawLocalFileSystem.class.getName()); + } + + @Test + public void testBulkImportFailure() throws Exception { + String tableName = getUniqueNames(1)[0]; + TableOperations to = getConnector().tableOperations(); + to.create(tableName); + FileSystem fs = getFileSystem(); -String rootPath = getUsableDir(); ++Path rootPath = getUsableDir(); + Path bulk = new Path(rootPath, "bulk"); + log.info("bulk: {}", bulk); + if (fs.exists(bulk)) { + fs.delete(bulk, true); + } + assertTrue(fs.mkdirs(bulk)); + Path err = new Path(rootPath, "err"); + log.info("err: {}", err); + if (fs.exists(err)) { + fs.delete(err, true); + } + assertTrue(fs.mkdirs(err)); + + Path rfile = new Path(bulk, "file.rf"); + FileSKVWriter writer = FileOperations.getInstance().openWriter(rfile.toString(), fs, new Configuration(), DefaultConfiguration.getInstance()); + writer.startDefaultLocalityGroup(); - ++ + final Value emptyValue = new Value(new byte[0]); + final SortedSet splits = new TreeSet(); + for (int i = 0; i < 100; i++) { + String row = String.format("%03d", i); + splits.add(new Text(row)); + writer.append(ne
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/da484a88 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/da484a88 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/da484a88 Branch: refs/heads/1.7 Commit: da484a8824ea5c130e0749b5494d452de8e7ab20 Parents: 071c32f dcd27de Author: Josh Elser Authored: Fri Aug 21 23:51:15 2015 -0400 Committer: Josh Elser Committed: Fri Aug 21 23:51:15 2015 -0400 -- .../accumulo/shell/commands/ActiveScanIterator.java | 10 +- .../test/java/org/apache/accumulo/test/ShellServerIT.java | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/da484a88/shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java -- diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java index d446534,000..9f2e23b mode 100644,00..100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ActiveScanIterator.java @@@ -1,93 -1,0 +1,93 @@@ +/* + * 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.accumulo.shell.commands; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.apache.accumulo.core.client.admin.ActiveScan; +import org.apache.accumulo.core.client.admin.InstanceOperations; +import org.apache.accumulo.core.client.admin.ScanType; +import org.apache.accumulo.core.util.Duration; + +class ActiveScanIterator implements Iterator { + + private InstanceOperations instanceOps; + private Iterator tsIter; + private Iterator scansIter; + + private void readNext() { +final List scans = new ArrayList(); + +while (tsIter.hasNext()) { + + final String tserver = tsIter.next(); + try { +final List asl = instanceOps.getActiveScans(tserver); + +for (ActiveScan as : asl) { + scans - .add(String.format("%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s |%10s |%20s |%10s |%10s | %s", tserver, as.getClient(), ++ .add(String.format("%21s |%21s |%9s |%9s |%7s |%6s |%8s |%8s |%10s |%20s |%10s |%20s |%10s | %s", tserver, as.getClient(), + Duration.format(as.getAge(), "", "-"), Duration.format(as.getLastContactTime(), "", "-"), as.getState(), as.getType(), as.getUser(), - as.getTable(), as.getColumns(), as.getAuthorizations(), (as.getType() == ScanType.SINGLE ? as.getTablet() : "N/A"), as.getSsiList(), - as.getSsio())); ++ as.getTable(), as.getColumns(), as.getAuthorizations(), (as.getType() == ScanType.SINGLE ? as.getTablet() : "N/A"), as.getScanid(), ++ as.getSsiList(), as.getSsio())); +} + } catch (Exception e) { +scans.add(tserver + " ERROR " + e.getMessage()); + } + + if (scans.size() > 0) { +break; + } +} + +scansIter = scans.iterator(); + } + + ActiveScanIterator(List tservers, InstanceOperations instanceOps) { +this.instanceOps = instanceOps; +this.tsIter = tservers.iterator(); + - final String header = String.format(" %-21s| %-21s| %-9s| %-9s| %-7s| %-6s| %-8s| %-8s| %-10s| %-20s| %-10s| %-10s | %s", "TABLET SERVER", "CLIENT", "AGE", - "LAST", "STATE", "TYPE", "USER", "TABLE", "COLUMNS", "AUTHORIZATIONS", "TABLET", "ITERATORS", "ITERATOR OPTIONS"); ++final String header = String.format(" %-21s| %-21s| %-9s| %-9s| %-7s| %-6s| %-8s| %-8s| %-10s| %-20s| %-10s| %-10s | %-20s | %s", "TABLET SERVER", ++"CLIENT", "AGE", "LAST", "STATE", "TYPE", "USER", "TABLE", "COLUMNS", "AUTHORIZATIONS", "TABLET", "SCAN ID", "ITERATORS", "
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/071c32f5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/071c32f5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/071c32f5 Branch: refs/heads/1.7 Commit: 071c32f5cf20e37c4d930ad188eff8fff700ac0f Parents: d5d883c a541e76 Author: Josh Elser Authored: Thu Aug 20 18:40:03 2015 -0400 Committer: Josh Elser Committed: Thu Aug 20 18:40:03 2015 -0400 -- .../server/security/AuditedSecurityOperation.java | 2 +- .../java/org/apache/accumulo/test/AuditMessageIT.java | 14 ++ 2 files changed, 11 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/071c32f5/server/base/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/071c32f5/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java index 14361a6,2896267..268965f --- a/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java +++ b/test/src/test/java/org/apache/accumulo/test/AuditMessageIT.java @@@ -81,10 -80,8 +81,11 @@@ public class AuditMessageIT extends Con @Override public void beforeClusterStart(MiniAccumuloConfigImpl cfg) throws Exception { +File f = new File(cfg.getConfDir(), "auditLog.xml"); +if (f.delete()) { + log.debug("Deleted " + f); +} + cfg.setNumTservers(1); -new File(cfg.getConfDir(), "auditLog.xml").delete(); } // Must be static to survive Junit re-initialising the class every time.
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: assemble/bin/accumulo Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5f76160c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5f76160c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5f76160c Branch: refs/heads/1.7 Commit: 5f76160c1d856bc07a09c23e2d03e6b0a113049b Parents: 4dd8c54 6425c37 Author: Josh Elser Authored: Wed Aug 5 12:37:21 2015 -0400 Committer: Josh Elser Committed: Wed Aug 5 12:37:21 2015 -0400 -- assemble/bin/accumulo | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5f76160c/assemble/bin/accumulo -- diff --cc assemble/bin/accumulo index 6e30c95,301d9a3..a688879 --- a/assemble/bin/accumulo +++ b/assemble/bin/accumulo @@@ -112,8 -117,15 +112,16 @@@ esa XML_FILES="${ACCUMULO_CONF_DIR}" LOG4J_JAR=$(find -H "${HADOOP_PREFIX}/lib" "${HADOOP_PREFIX}"/share/hadoop/common/lib -name 'log4j*.jar' -print 2>/dev/null | head -1) +SLF4J_JARS="${ACCUMULO_HOME}/lib/slf4j-api.jar:${ACCUMULO_HOME}/lib/slf4j-log4j12.jar" + + # The `find` command could fail for environmental reasons or bad configuration + # Avoid trying to run Accumulo when we can't find the jar -if [ -z "${LOG4J_JAR}" ]; then ++if [ -z "${LOG4J_JAR}" -a -z "${CLASSPATH}" ]; then +echo "Could not locate Log4j jar in Hadoop installation at ${HADOOP_PREFIX}" +exit 1 + fi + -CLASSPATH="${XML_FILES}:${START_JAR}:${LOG4J_JAR}" +CLASSPATH="${XML_FILES}:${START_JAR}:${SLF4J_JARS}:${LOG4J_JAR}:${CLASSPATH}" if [ -z "${JAVA_HOME}" -o ! -d "${JAVA_HOME}" ]; then echo "JAVA_HOME is not set or is not a directory. Please make sure it's set globally or in conf/accumulo-env.sh"
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/acef2e5d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/acef2e5d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/acef2e5d Branch: refs/heads/1.7 Commit: acef2e5d4a72c0dcd372ce0d35da4fc307b74496 Parents: ba300ba 62e3b0f Author: Josh Elser Authored: Thu Jul 2 17:57:11 2015 -0400 Committer: Josh Elser Committed: Thu Jul 2 18:17:02 2015 -0400 -- .../java/org/apache/accumulo/shell/mock/MockShell.java | 11 +++ 1 file changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/acef2e5d/shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java -- diff --cc shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java index c11aed5,000..609f23f mode 100644,00..100644 --- a/shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java +++ b/shell/src/main/java/org/apache/accumulo/shell/mock/MockShell.java @@@ -1,146 -1,0 +1,157 @@@ +/* + * 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.accumulo.shell.mock; + +import static java.nio.charset.StandardCharsets.UTF_8; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import jline.console.ConsoleReader; + ++import org.apache.accumulo.core.client.AccumuloException; ++import org.apache.accumulo.core.client.AccumuloSecurityException; ++import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.mock.MockInstance; +import org.apache.accumulo.shell.Shell; +import org.apache.accumulo.shell.ShellOptionsJC; ++import org.apache.commons.cli.CommandLine; ++import org.apache.commons.vfs2.FileSystemException; + +/** + * An Accumulo Shell implementation that allows a developer to attach an InputStream and Writer to the Shell for testing purposes. + */ +public class MockShell extends Shell { + private static final String NEWLINE = "\n"; + + protected InputStream in; + protected OutputStream out; + + public MockShell(InputStream in, OutputStream out) throws IOException { +super(); +this.in = in; +this.out = out; + } + + @Override + public boolean config(String... args) { +// If configuring the shell failed, fail quickly +if (!super.config(args)) { + return false; +} + +// Update the ConsoleReader with the input and output "redirected" +try { + this.reader = new ConsoleReader(in, out); +} catch (Exception e) { + printException(e); + return false; +} + +// Don't need this for testing purposes +this.reader.setHistoryEnabled(false); +this.reader.setPaginationEnabled(false); + +// Make the parsing from the client easier; +this.verbose = false; +return true; + } + + @Override + protected void setInstance(ShellOptionsJC options) { +// We always want a MockInstance for this test +instance = new MockInstance(); + } + + @Override + public int start() throws IOException { +String input; +if (isVerbose()) + printInfo(); + +if (execFile != null) { + java.util.Scanner scanner = new java.util.Scanner(execFile, UTF_8.name()); + try { +while (scanner.hasNextLine() && !hasExited()) { + execCommand(scanner.nextLine(), true, isVerbose()); +} + } finally { +scanner.close(); + } +} else if (execCommand != null) { + for (String command : execCommand.split("\n")) { +execCommand(command, true, isVerbose()); + } + return exitCode; +} + +while (true) { + if (hasExited()) +return exitCode; + + reader.setPrompt(getDefaultPrompt()); + input = reader.readLine(); + if (
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3d63bf7e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3d63bf7e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3d63bf7e Branch: refs/heads/1.7 Commit: 3d63bf7eb168296c9705a9815792985ae7ee5114 Parents: d0c1e9f 18d68fc Author: Josh Elser Authored: Wed Jun 24 13:58:53 2015 -0400 Committer: Josh Elser Committed: Wed Jun 24 13:58:53 2015 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d0c1e9f1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d0c1e9f1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d0c1e9f1 Branch: refs/heads/1.7 Commit: d0c1e9f17a0908c1041cadd6fb90a44ffaf3db88 Parents: f1bc1dd af05876 Author: Josh Elser Authored: Wed Jun 24 12:39:53 2015 -0400 Committer: Josh Elser Committed: Wed Jun 24 12:39:53 2015 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/system/continuous/run-verify.sh Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f1bc1dd8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f1bc1dd8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f1bc1dd8 Branch: refs/heads/1.7 Commit: f1bc1dd8dbf73e0063aa7e1daf577c953a9a63e0 Parents: a0032a9 e785da1 Author: Josh Elser Authored: Tue Jun 23 22:50:29 2015 -0400 Committer: Josh Elser Committed: Tue Jun 23 22:50:29 2015 -0400 -- test/system/continuous/run-verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1bc1dd8/test/system/continuous/run-verify.sh -- diff --cc test/system/continuous/run-verify.sh index 4706d6b,42eb214..c68c3ea --- a/test/system/continuous/run-verify.sh +++ b/test/system/continuous/run-verify.sh @@@ -27,12 -27,16 +27,12 @@@ bin=$( cd -P "$( dirname "${SOURCE}" ) script=$( basename "${SOURCE}" ) # Stop: Resolve Script Directory -. ${bin}/mapred-setup.sh +. "${bin}/mapred-setup.sh" AUTH_OPT=""; +[[ -n $VERIFY_AUTHS ]] && AUTH_OPT="--auths $VERIFY_AUTHS" -if [ -n "$VERIFY_AUTHS" ] ; then - AUTH_OPT="--auths $VERIFY_AUTHS"; -fi SCAN_OPT=--offline -if [ "$SCAN_OFFLINE" == "false" ] ; then - SCAN_OPT= -fi +[[ $SCAN_OFFLINE == false ]] && SCAN_OPT= - "$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT" -$ACCUMULO_HOME/bin/tool.sh "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" $AUTH_OPT -i $INSTANCE_NAME -z $ZOO_KEEPERS -u $USER -p $PASS --table $TABLE --output $VERIFY_OUT --maxMappers $VERIFY_MAX_MAPS --reducers $VERIFY_REDUCERS $SCAN_OPT ++"$ACCUMULO_HOME/bin/tool.sh" "$SERVER_LIBJAR" org.apache.accumulo.test.continuous.ContinuousVerify -Dmapreduce.job.reduce.slowstart.completedmaps=0.95 -libjars "$SERVER_LIBJAR" "$AUTH_OPT" -i "$INSTANCE_NAME" -z "$ZOO_KEEPERS" -u "$USER" -p "$PASS" --table "$TABLE" --output "$VERIFY_OUT" --maxMappers "$VERIFY_MAX_MAPS" --reducers "$VERIFY_REDUCERS" "$SCAN_OPT"
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/61bb1b47 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/61bb1b47 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/61bb1b47 Branch: refs/heads/1.7 Commit: 61bb1b47df3639f3fff59a4e591986282078cbc8 Parents: e76d89a 28be43e Author: Christopher Tubbs Authored: Wed Jun 17 18:16:08 2015 -0400 Committer: Christopher Tubbs Committed: Wed Jun 17 18:16:08 2015 -0400 -- CHANGES| 1776 --- assemble/src/main/assemblies/component.xml |1 - 2 files changed, 1777 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bb1b47/assemble/src/main/assemblies/component.xml -- diff --cc assemble/src/main/assemblies/component.xml index 463bcf6,bf2d4e2..644f1a9 --- a/assemble/src/main/assemblies/component.xml +++ b/assemble/src/main/assemblies/component.xml @@@ -248,20 -244,9 +248,19 @@@ ../ 0644 - CHANGES LICENSE NOTICE -README +README.md +INSTALL.md +BUILD.md + + + + target + lib + 0644 + +VERSIONS
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: maven-plugin/pom.xml pom.xml Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/50f8a793 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/50f8a793 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/50f8a793 Branch: refs/heads/1.7 Commit: 50f8a7936cf2ad5c1db9d893afcd5ccb30511538 Parents: 21059c5 ec6c0df Author: Christopher Tubbs Authored: Tue Jun 9 20:11:41 2015 -0400 Committer: Christopher Tubbs Committed: Tue Jun 9 20:11:41 2015 -0400 -- maven-plugin/pom.xml | 80 ++- pom.xml | 2 +- 2 files changed, 46 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/50f8a793/maven-plugin/pom.xml -- diff --cc maven-plugin/pom.xml index 9fc167d,e9eec9a..41be7f4 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@@ -83,6 -83,32 +83,35 @@@ + + org.apache.maven.plugins + maven-invoker-plugin + + true + ${project.build.directory}/it + + */pom.xml + + ${project.build.directory}/local-repo + src/it/settings.xml + + clean + post-integration-test + ++ ++!autoformat ++ + + + + integration-test + + install + run + + + + http://git-wip-us.apache.org/repos/asf/accumulo/blob/50f8a793/pom.xml -- diff --cc pom.xml index 3815ad7,c9ca616..3477bff --- a/pom.xml +++ b/pom.xml @@@ -654,7 -622,7 +654,7 @@@ clean deploy clean verify @{project.version} - apache-release,move-source-tarball,seal-jars,skip-findbugs,!test-accumulo-maven-plugin - seal-jars,skip-findbugs,skip-plugin-its-with-skipTests ++ apache-release,move-source-tarball,seal-jars,skip-findbugs,skip-plugin-its-with-skipTests false false true
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/21059c58 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/21059c58 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/21059c58 Branch: refs/heads/1.7 Commit: 21059c58d2e7ecfc97c7557b5387776327b386b4 Parents: e0c72f2 18a3ef6 Author: Christopher Tubbs Authored: Tue Jun 9 18:55:38 2015 -0400 Committer: Christopher Tubbs Committed: Tue Jun 9 18:55:38 2015 -0400 -- .../org/apache/accumulo/master/tableOps/CreateImportDir.java | 8 .../main/java/org/apache/accumulo/tserver/TabletServer.java | 4 2 files changed, 8 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/21059c58/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java -- diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java index cb70c68,000..0dfe2e1 mode 100644,00..100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java @@@ -1,65 -1,0 +1,65 @@@ +/* + * 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.accumulo.master.tableOps; + ++import java.io.IOException; +import java.util.Arrays; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.fate.Repo; +import org.apache.accumulo.master.Master; +import org.apache.accumulo.server.ServerConstants; +import org.apache.accumulo.server.tablets.UniqueNameAllocator; +import org.apache.hadoop.fs.Path; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class CreateImportDir extends MasterRepo { + private static final Logger log = LoggerFactory.getLogger(CreateImportDir.class); + private static final long serialVersionUID = 1L; + + private ImportedTableInfo tableInfo; + + CreateImportDir(ImportedTableInfo ti) { +this.tableInfo = ti; + } + + @Override + public Repo call(long tid, Master master) throws Exception { + +UniqueNameAllocator namer = UniqueNameAllocator.getInstance(); + +Path exportDir = new Path(tableInfo.exportDir); +String[] tableDirs = ServerConstants.getTablesDirs(); + +log.info("Looking for matching filesystem for " + exportDir + " from options " + Arrays.toString(tableDirs)); +Path base = master.getFileSystem().matchingFileSystem(exportDir, tableDirs); - log.info("Chose base table directory of " + base); - // Sanity check that a valid FileSystem was found for the exportDir - if (null == base) { - throw new RuntimeException("Could not determine matching FileSystem for " + exportDir); ++if (base == null) { ++ throw new IOException(tableInfo.exportDir + " is not in a volume configured for Accumulo"); +} ++log.info("Chose base table directory of " + base); +Path directory = new Path(base, tableInfo.tableId); + +Path newBulkDir = new Path(directory, Constants.BULK_PREFIX + namer.getNextName()); + +tableInfo.importDir = newBulkDir.toString(); + +log.info("Using import dir: " + tableInfo.importDir); + +return new MapImportFileNames(tableInfo); + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/21059c58/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java index b4c5e5f,0446da3..5656db4 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java @@@ -1711,8 -253
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e0c72f25 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e0c72f25 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e0c72f25 Branch: refs/heads/1.7 Commit: e0c72f25064990d1e6d5f6f14dfda944a54d4371 Parents: e16a6fa 8c0d881 Author: Christopher Tubbs Authored: Tue Jun 9 13:52:01 2015 -0400 Committer: Christopher Tubbs Committed: Tue Jun 9 13:52:01 2015 -0400 -- .../accumulo/minicluster/impl/MiniAccumuloClusterImpl.java| 4 .../accumulo/minicluster/impl/MiniAccumuloConfigImpl.java | 7 +++ 2 files changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0c72f25/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e0c72f25/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java -- diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java index ef498bf,8feef61..c8f65d2 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java @@@ -28,11 -29,11 +28,13 @@@ import org.apache.accumulo.core.conf.Cr import org.apache.accumulo.core.conf.DefaultConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.minicluster.MemoryUnit; + import org.apache.accumulo.minicluster.MiniAccumuloCluster; +import org.apache.accumulo.minicluster.ServerType; import org.apache.accumulo.server.util.PortUtils; import org.apache.hadoop.conf.Configuration; + import org.apache.hadoop.fs.FileSystem; -import org.apache.log4j.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Holds configuration for {@link MiniAccumuloClusterImpl}. Required configurations must be passed to constructor(s) and all other configurations are optional.
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e04ea77d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e04ea77d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e04ea77d Branch: refs/heads/1.7 Commit: e04ea77d770755f61c9318290bb041923334a791 Parents: c5aa060 b754d12 Author: Josh Elser Authored: Thu Jun 4 00:13:05 2015 -0400 Committer: Josh Elser Committed: Thu Jun 4 00:13:05 2015 -0400 -- .../apache/accumulo/test/functional/ScanIdIT.java | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e04ea77d/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/99c734c8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/99c734c8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/99c734c8 Branch: refs/heads/1.7 Commit: 99c734c8c5c389ea600fe08117c183365c89d8b8 Parents: d71e5ee 9a4dd30 Author: Josh Elser Authored: Mon Jun 1 18:37:30 2015 -0400 Committer: Josh Elser Committed: Mon Jun 1 18:37:30 2015 -0400 -- .../java/org/apache/accumulo/tserver/TabletServer.java | 11 --- 1 file changed, 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/99c734c8/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java index df0848d,128aaa9..b4c5e5f --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java @@@ -1380,30 -2203,21 +1380,19 @@@ public class TabletServer extends Accum return result; } -private ZooCache masterLockCache = new ZooCache(); - private void checkPermission(TCredentials credentials, String lock, final String request) throws ThriftSecurityException { - boolean fatal = false; try { -log.debug("Got " + request + " message from user: " + credentials.getPrincipal()); +log.trace("Got " + request + " message from user: " + credentials.getPrincipal()); if (!security.canPerformSystemActions(credentials)) { log.warn("Got " + request + " message from user: " + credentials.getPrincipal()); throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED); } } catch (ThriftSecurityException e) { log.warn("Got " + request + " message from unauthenticatable user: " + e.getUser()); -if (SystemCredentials.get().getToken().getClass().getName().equals(credentials.getTokenClassName())) { - log.fatal("Got message from a service with a mismatched configuration. Please ensure a compatible configuration.", e); +if (getCredentials().getToken().getClass().getName().equals(credentials.getTokenClassName())) { + log.error("Got message from a service with a mismatched configuration. Please ensure a compatible configuration.", e); - fatal = true; } throw e; - } finally { - if (fatal) { - Halt.halt(1, new Runnable() { - @Override - public void run() { - gcLogger.logGCInfo(TabletServer.this.getConfiguration()); - } - }); - } } if (tabletServerLock == null || !tabletServerLock.wasLockAcquired()) {
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/61bfbb22 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/61bfbb22 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/61bfbb22 Branch: refs/heads/1.7 Commit: 61bfbb22e39f8e379e106351bffe6448f4c60254 Parents: afdd2e6 182fbce Author: Christopher Tubbs Authored: Fri May 29 16:04:18 2015 -0400 Committer: Christopher Tubbs Committed: Fri May 29 16:04:18 2015 -0400 -- .../simple/mapreduce/bulk/VerifyIngest.java | 18 +++- .../accumulo/test/functional/ExamplesIT.java| 31 2 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java -- diff --cc examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java index 546b1ca,1385a19..16530cc --- a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java +++ b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/mapreduce/bulk/VerifyIngest.java @@@ -49,9 -48,9 +49,9 @@@ public class VerifyIngest opts.parseArgs(VerifyIngest.class.getName(), args); Connector connector = opts.getConnector(); -Scanner scanner = connector.createScanner(opts.tableName, opts.auths); +Scanner scanner = connector.createScanner(opts.getTableName(), opts.auths); - scanner.setRange(new Range(new Text(String.format("row_%08d", opts.startRow)), null)); + scanner.setRange(new Range(new Text(String.format("row_%010d", opts.startRow)), null)); Iterator> si = scanner.iterator(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/61bfbb22/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java index ef610ca,3204528..257c7c1 --- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java @@@ -23,6 -23,6 +23,7 @@@ import static org.junit.Assert.assertTr import java.io.File; import java.io.IOException; ++import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; @@@ -446,21 -350,10 +448,26 @@@ public class ExamplesIT extends Accumul fs.delete(p, true); } goodExec(GenerateTestData.class, "--start-row", "0", "--count", "1", "--output", dir + "/tmp/input/data"); - String[] args; - if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName}; - } else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName}; - } - goodExec(SetupTable.class, args); -goodExec(SetupTable.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName); -goodExec(BulkIngestExample.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", -"--workDir", dir + "/tmp"); -goodExec(VerifyIngest.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "1"); ++ ++List commonArgs = new ArrayList<>(Arrays.asList(new String[] {"-i", instance, "-z", keepers, "-u", user, "--table", tableName})); +if (saslEnabled) { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "--keytab", keytab, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("--keytab"); ++ commonArgs.add(keytab); +} else { - args = new String[] {"-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--inputDir", dir + "/tmp/input", "--workDir", - dir + "/tmp"}; ++ commonArgs.add("-p"); ++ commonArgs.add(passwd); +} - goodExec(BulkIngestExample.class, args); ++ ++List args = new ArrayList<>(commonArgs); ++goodExec(SetupTable.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.asList(new String[] {"--inputDir", dir + "/tmp/input", "--workDir", dir + "/tmp"})); ++goodExec(BulkIngestExample.class, args.toArray(new String[0])); ++ ++args = new ArrayList<>(commonArgs); ++args.addAll(Arrays.asL
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f6ba154f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f6ba154f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f6ba154f Branch: refs/heads/1.7 Commit: f6ba154f2d919961b092e50c89f94efc7f7763be Parents: caef59e d5e26b5 Author: Christopher Tubbs Authored: Wed May 27 16:28:43 2015 -0400 Committer: Christopher Tubbs Committed: Wed May 27 16:28:43 2015 -0400 -- .../src/main/java/org/apache/accumulo/tserver/scan/ScanTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f6ba154f/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/ScanTask.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/scan/ScanTask.java index abf3d1a,000..6d5adce mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/ScanTask.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/ScanTask.java @@@ -1,147 -1,0 +1,147 @@@ +/* + * 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.accumulo.tserver.scan; + +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.CancellationException; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.RunnableFuture; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + +import org.apache.accumulo.tserver.TabletServer; + +public abstract class ScanTask implements RunnableFuture { + + protected final TabletServer server; + protected AtomicBoolean interruptFlag; + protected ArrayBlockingQueue resultQueue; + protected AtomicInteger state; + protected AtomicReference runState; + + private static final int INITIAL = 1; + private static final int ADDED = 2; + private static final int CANCELED = 3; + + ScanTask(TabletServer server) { +this.server = server; +interruptFlag = new AtomicBoolean(false); +runState = new AtomicReference(ScanRunState.QUEUED); +state = new AtomicInteger(INITIAL); +resultQueue = new ArrayBlockingQueue(1); + } + + protected void addResult(Object o) { +if (state.compareAndSet(INITIAL, ADDED)) + resultQueue.add(o); +else if (state.get() == ADDED) + throw new IllegalStateException("Tried to add more than one result"); + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { +if (!mayInterruptIfRunning) + throw new IllegalArgumentException("Cancel will always attempt to interupt running next batch task"); + +if (state.get() == CANCELED) + return true; + +if (state.compareAndSet(INITIAL, CANCELED)) { + interruptFlag.set(true); + resultQueue = null; + return true; +} + +return false; + } + + @Override + public T get() throws InterruptedException, ExecutionException { +throw new UnsupportedOperationException(); + } + + @Override + public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + +ArrayBlockingQueue localRQ = resultQueue; + +if (isCancelled()) + throw new CancellationException(); + +if (localRQ == null) { + int st = state.get(); + String stateStr; + switch (st) { +case ADDED: + stateStr = "ADDED"; + break; +case CANCELED: + stateStr = "CANCELED"; + break; +case INITIAL: + stateStr = "INITIAL"; + break; +default: - stateStr = "UNKONWN"; ++ stateStr =
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/07672bdc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/07672bdc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/07672bdc Branch: refs/heads/1.7 Commit: 07672bdc3bae59165bcd408bab2082332312b1d6 Parents: 829f46d de2763e Author: Christopher Tubbs Authored: Tue May 26 16:19:01 2015 -0400 Committer: Christopher Tubbs Committed: Tue May 26 16:19:01 2015 -0400 -- .../accumulo/monitor/EmbeddedWebServer.java | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/07672bdc/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java -- diff --cc server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java index 8c23a16,41890e8..f0213e7 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java @@@ -21,11 -21,14 +21,14 @@@ import javax.servlet.http.HttpServlet import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.commons.lang.StringUtils; + import org.eclipse.jetty.security.ConstraintMapping; + import org.eclipse.jetty.security.ConstraintSecurityHandler; +import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.session.SessionHandler; -import org.eclipse.jetty.server.ssl.SslSelectChannelConnector; import org.eclipse.jetty.servlet.ServletContextHandler; + import org.eclipse.jetty.util.security.Constraint; import org.eclipse.jetty.util.ssl.SslContextFactory; public class EmbeddedWebServer {
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/829f46d0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/829f46d0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/829f46d0 Branch: refs/heads/1.7 Commit: 829f46d06feff2ce967ee28180d427a60eafb508 Parents: 5320861 2590322 Author: Josh Elser Authored: Tue May 26 15:30:02 2015 -0400 Committer: Josh Elser Committed: Tue May 26 15:30:02 2015 -0400 -- .../monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/829f46d0/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/747da5a9 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/747da5a9 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/747da5a9 Branch: refs/heads/1.7 Commit: 747da5a9ac01f36a207cd0b0305aeaeedccbae54 Parents: acd8a63 b4f6e5e Author: Josh Elser Authored: Thu May 21 21:39:36 2015 -0400 Committer: Josh Elser Committed: Thu May 21 21:39:36 2015 -0400 -- --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/25d9b285 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/25d9b285 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/25d9b285 Branch: refs/heads/1.7 Commit: 25d9b2854bd53562b67939b7b69c80924eb6e32f Parents: 1faee53 63be7d3 Author: Josh Elser Authored: Wed May 20 22:26:24 2015 -0400 Committer: Josh Elser Committed: Wed May 20 22:26:24 2015 -0400 -- .../src/main/java/org/apache/accumulo/server/init/Initialize.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/25d9b285/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java index c6f1dd8,fcc22c5..9b9dac9 --- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java +++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java @@@ -701,13 -532,14 +701,13 @@@ public class Initialize implements Keyw Path iidPath = new Path(aBasePath, ServerConstants.INSTANCE_ID_DIR); Path versionPath = new Path(aBasePath, ServerConstants.VERSION_DIR); +UUID uuid = UUID.fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, SiteConfiguration.getInstance())); for (Pair replacementVolume : ServerConstants.getVolumeReplacements()) { - if (aBasePath.equals(replacementVolume.getSecond())) + if (aBasePath.equals(replacementVolume.getFirst())) -log.error(aBasePath + " is set to be replaced in " + Property.INSTANCE_VOLUMES_REPLACEMENTS + " and should not appear in " + -Property.INSTANCE_VOLUMES + ". It is highly recommended that this property be removed as data could still be written to this volume."); +log.error(aBasePath + " is set to be replaced in " + Property.INSTANCE_VOLUMES_REPLACEMENTS + " and should not appear in " + Property.INSTANCE_VOLUMES ++ ". It is highly recommended that this property be removed as data could still be written to this volume."); } -UUID uuid = UUID.fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, ServerConfiguration.getSiteConfiguration())); - if (ServerConstants.DATA_VERSION != Accumulo.getAccumuloPersistentVersion(versionPath.getFileSystem(CachedConfiguration.getInstance()), versionPath)) { throw new IOException("Accumulo " + Constants.VERSION + " cannot initialize data version " + Accumulo.getAccumuloPersistentVersion(fs)); }
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/98f42c76 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/98f42c76 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/98f42c76 Branch: refs/heads/1.7 Commit: 98f42c7629b470f2d1833603a834a18fc59f7776 Parents: 9546b10 7813f50 Author: Christopher Tubbs Authored: Mon May 11 14:06:42 2015 -0400 Committer: Christopher Tubbs Committed: Mon May 11 14:06:42 2015 -0400 -- assemble/bin/build_native_library.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/31dd5ca0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/31dd5ca0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/31dd5ca0 Branch: refs/heads/1.7 Commit: 31dd5ca05663463d4a4a455accab9ced9ebaa63c Parents: 61eea42 fa22fa4 Author: Josh Elser Authored: Fri May 8 11:55:14 2015 -0400 Committer: Josh Elser Committed: Fri May 8 12:31:44 2015 -0400 -- .../shell/commands/GetAuthsCommand.java | 19 ++--- .../shell/commands/GetAuthsCommandTest.java | 44 2 files changed, 57 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/31dd5ca0/shell/src/main/java/org/apache/accumulo/shell/commands/GetAuthsCommand.java -- diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/GetAuthsCommand.java index c4c1b67,000..5c6a4eb mode 100644,00..100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/GetAuthsCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/GetAuthsCommand.java @@@ -1,68 -1,0 +1,75 @@@ +/* + * 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.accumulo.shell.commands; + +import java.io.IOException; - import java.util.SortedSet; - import java.util.TreeSet; ++import java.util.ArrayList; ++import java.util.Collections; ++import java.util.List; + +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.shell.Shell; +import org.apache.accumulo.shell.Shell.Command; +import org.apache.accumulo.shell.ShellOptions; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.lang.StringUtils; + +public class GetAuthsCommand extends Command { + private Option userOpt; + + @Override + public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, IOException { +final String user = cl.getOptionValue(userOpt.getOpt(), shellState.getConnector().whoami()); +// Sort authorizations +Authorizations auths = shellState.getConnector().securityOperations().getUserAuthorizations(user); - SortedSet set = new TreeSet(String.CASE_INSENSITIVE_ORDER); - for (byte[] auth : auths) { - set.add(new String(auth)); - } ++List set = sortAuthorizations(auths); +shellState.getReader().println(StringUtils.join(set, ',')); +return 0; + } + ++ protected List sortAuthorizations(Authorizations auths) { ++List list = new ArrayList(); ++for (byte[] auth : auths) { ++ list.add(new String(auth)); ++} ++Collections.sort(list, String.CASE_INSENSITIVE_ORDER); ++return list; ++ } ++ + @Override + public String description() { +return "displays the maximum scan authorizations for a user"; + } + + @Override + public Options getOptions() { +final Options o = new Options(); +userOpt = new Option(ShellOptions.userOption, "user", true, "user to operate on"); +userOpt.setArgName("user"); +o.addOption(userOpt); +return o; + } + + @Override + public int numArgs() { +return 0; + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/31dd5ca0/shell/src/test/java/org/apache/accumulo/shell/commands/GetAuthsCommandTest.java -- diff --cc shell/src/test/java/org/apache/accumulo/shell/commands/GetAuthsCommandTest.java index 000,000..ab57252 new file mode 100644 --- /dev/null +++ b/shell/src/test/java/org/apache/accumulo/shell/commands/GetAuthsCommandTest.java @@@ -1,0 -1,0 +1,44 @@@ ++/* ++ * Licensed to the Apache Software Foundation (ASF)
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: shell/src/main/java/org/apache/accumulo/shell/commands/DUCommand.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0bbc6759 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0bbc6759 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0bbc6759 Branch: refs/heads/1.7 Commit: 0bbc67594b25954ed2cb3a2f04e45789a1c7691c Parents: 12366d4 2b168f8 Author: Josh Elser Authored: Mon May 4 14:09:31 2015 -0400 Committer: Josh Elser Committed: Mon May 4 14:09:31 2015 -0400 -- .../org/apache/accumulo/shell/commands/DUCommand.java | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bbc6759/shell/src/main/java/org/apache/accumulo/shell/commands/DUCommand.java -- diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/DUCommand.java index 3e851d4,000..2adcc81 mode 100644,00..100644 --- a/shell/src/main/java/org/apache/accumulo/shell/commands/DUCommand.java +++ b/shell/src/main/java/org/apache/accumulo/shell/commands/DUCommand.java @@@ -1,126 -1,0 +1,129 @@@ +/* + * 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.accumulo.shell.commands; + +import java.io.IOException; +import java.util.Arrays; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.NamespaceNotFoundException; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.admin.DiskUsage; +import org.apache.accumulo.core.client.impl.Namespaces; +import org.apache.accumulo.core.util.NumUtil; +import org.apache.accumulo.shell.Shell; +import org.apache.accumulo.shell.Shell.Command; +import org.apache.accumulo.shell.ShellOptions; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; + +public class DUCommand extends Command { + + private Option optTablePattern, optHumanReadble, optNamespace; + + @Override + public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws IOException, TableNotFoundException, + NamespaceNotFoundException { + +final SortedSet tables = new TreeSet(Arrays.asList(cl.getArgs())); + +if (cl.hasOption(ShellOptions.tableOption)) { - String tableName = cl.getOptionValue(ShellOptions.tableOption); - if (!shellState.getConnector().tableOperations().exists(tableName)) { - throw new TableNotFoundException(tableName, tableName, "specified table that doesn't exist"); - } - tables.add(tableName); ++ tables.add(cl.getOptionValue(ShellOptions.tableOption)); +} + +if (cl.hasOption(optNamespace.getOpt())) { + Instance instance = shellState.getInstance(); + String namespaceId = Namespaces.getNamespaceId(instance, cl.getOptionValue(optNamespace.getOpt())); + tables.addAll(Namespaces.getTableNames(instance, namespaceId)); +} + +boolean prettyPrint = cl.hasOption(optHumanReadble.getOpt()) ? true : false; + +// Add any patterns +if (cl.hasOption(optTablePattern.getOpt())) { + for (String table : shellState.getConnector().tableOperations().list()) { +if (table.matches(cl.getOptionValue(optTablePattern.getOpt( { + tables.add(table); +} + } +} + +// If we didn't get any tables, and we have a table selected, add the current table +if (tables.isEmpty() && !shellState.getTableName().isEmpty()) { + tables.add(shellState.getTableName()); +} + ++// sanity check...make sure the user-specified tables exist ++for (String tableName : tables) { ++ if (!shellState.getConnector().tableOperations().exists(tableName)) { ++throw new TableNotFoundException(tableName, tableName, "specified tabl
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Conflicts: core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/12366d4e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/12366d4e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/12366d4e Branch: refs/heads/1.7 Commit: 12366d4e672a004e9324adc87d4e94907530a770 Parents: 2436eec a506c0b Author: Josh Elser Authored: Mon May 4 12:08:09 2015 -0400 Committer: Josh Elser Committed: Mon May 4 12:27:51 2015 -0400 -- .../client/impl/NamespaceOperationsImpl.java| 10 +++ .../core/client/impl/TableOperationsImpl.java | 30 +--- 2 files changed, 19 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/12366d4e/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java -- diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java index ce6bc09,9a66fef..b087c73 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java @@@ -85,11 -87,11 +85,11 @@@ public class NamespaceOperationsImpl ex @Override public void create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException { -ArgumentChecker.notNull(namespace); +checkArgument(namespace != null, "namespace is null"); try { - doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes())), Collections. emptyMap(), - namespace); + doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))), - Collections. emptyMap()); ++ Collections. emptyMap(), namespace); } catch (NamespaceNotFoundException e) { // should not happen throw new AssertionError(e); @@@ -127,9 -128,9 +127,9 @@@ public void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloSecurityException, NamespaceNotFoundException, AccumuloException, NamespaceExistsException { -List args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes()), ByteBuffer.wrap(newNamespaceName.getBytes())); +List args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes(UTF_8)), ByteBuffer.wrap(newNamespaceName.getBytes(UTF_8))); Map opts = new HashMap(); - doNamespaceFateOperation(FateOperation.NAMESPACE_RENAME, args, opts); + doNamespaceFateOperation(FateOperation.NAMESPACE_RENAME, args, opts, oldNamespaceName); } @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/12366d4e/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java -- diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java index 0e30d52,6e6ca19..6f9ea29 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java @@@ -92,12 -90,11 +92,11 @@@ import org.apache.accumulo.core.metadat import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.RootTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; +import org.apache.accumulo.core.rpc.ThriftUtil; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException; import org.apache.accumulo.core.tabletserver.thrift.TabletClientService; -import org.apache.accumulo.core.util.ArgumentChecker; +import org.apache.accumulo.core.trace.Tracer; - import org.apache.accumulo.core.util.ByteBufferUtil; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.core.util.LocalityGroupUtil; import org.apache.accumulo.core.util.MapCounter; @@@ -276,14 -308,13 +275,13 @@@ public class TableOperationsImpl extend String ret = waitForFateOperation(opid); return ret; } catch (ThriftSecurityException e) { - String tableName = ByteBufferUtil.toString(args.get(0)); switch (e.getCode()) { case TABLE_DOESNT_EXIST: - throw new TableNotFoundException(null, tableName, "Target table does not exist"); + throw new TableNotFoundException(null
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Merge branch '1.6' into 1.7 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/66075c3e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/66075c3e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/66075c3e Branch: refs/heads/1.7 Commit: 66075c3eaf67cfe5cc8cd5e1c16ec595b98ae3c5 Parents: 4fa8a8f bc87145 Author: Josh Elser Authored: Mon Apr 27 17:58:34 2015 -0400 Committer: Josh Elser Committed: Mon Apr 27 17:58:34 2015 -0400 -- .../src/main/java/org/apache/accumulo/master/Master.java | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/66075c3e/server/master/src/main/java/org/apache/accumulo/master/Master.java --