svn commit: r1464582 - in /accumulo/branches/1.5: server/src/main/java/org/apache/accumulo/server/master/tableOps/ server/src/main/java/org/apache/accumulo/server/security/handler/ test/src/main/java/
Author: ecn Date: Thu Apr 4 14:51:51 2013 New Revision: 1464582 URL: http://svn.apache.org/r1464582 Log: ACCUMULO-1238 throw a better error than permission denied when a table has just been deleted Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java?rev=1464582r1=1464581r2=1464582view=diff == --- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java (original) +++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java Thu Apr 4 14:51:51 2013 @@ -223,11 +223,6 @@ class SetupPermissions extends MasterRep } @Override - public long isReady(long tid, Master environment) throws Exception { -return 0; - } - - @Override public RepoMaster call(long tid, Master env) throws Exception { // give all table permissions to the creator SecurityOperation security = AuditedSecurityOperation.getInstance(); Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java?rev=1464582r1=1464581r2=1464582view=diff == --- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java (original) +++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java Thu Apr 4 14:51:51 2013 @@ -47,6 +47,7 @@ public class ZKPermHandler implements Pe private static PermissionHandler zkPermHandlerInstance = null; private String ZKUserPath; + private String ZKTablePath; private final ZooCache zooCache; private final String ZKUserSysPerms = /System; private final String ZKUserTablePerms = /Tables; @@ -59,6 +60,7 @@ public class ZKPermHandler implements Pe public void initialize(String instanceId, boolean initialize) { ZKUserPath = ZKSecurityTool.getInstancePath(instanceId) + /users; +ZKTablePath = ZKSecurityTool.getInstancePath(instanceId) + /tables; } public ZKPermHandler() { @@ -66,7 +68,7 @@ public class ZKPermHandler implements Pe } @Override - public boolean hasTablePermission(String user, String table, TablePermission permission) { + public boolean hasTablePermission(String user, String table, TablePermission permission) throws TableNotFoundException { byte[] serializedPerms; try { String path = ZKUserPath + / + user + ZKUserTablePerms + / + table; @@ -74,6 +76,22 @@ public class ZKPermHandler implements Pe serializedPerms = ZooReaderWriter.getRetryingInstance().getData(path, null); } catch (KeeperException e) { if (e.code() == Code.NONODE) { +// maybe the table was just deleted? +try { + // check for existence: + ZooReaderWriter.getRetryingInstance().getData(ZKTablePath + / + table, null); + // it's there, you don't have permission + return false; +} catch (InterruptedException ex) { + log.warn(Unhandled InterruptedException, failing closed for table permission check, e); + return false; +} catch (KeeperException ex) { + // not there, throw an informative exception + if (e.code() == Code.NONODE) { +throw new TableNotFoundException(null, table, while checking permissions); + } + log.warn(Unhandled InterruptedException, failing closed for table permission check, e); +} return false; } log.warn(Unhandled KeeperException, failing closed for table permission check, e); Modified: accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java?rev=1464582r1=1464581r2=1464582view=diff == --- accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java (original) +++ accumulo/branches/1.5/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/CloneTable.java Thu Apr 4 14:51:51
svn commit: r1464672 - in /accumulo/branches/1.5: server/src/main/java/org/apache/accumulo/server/master/state/ test/src/test/java/org/apache/accumulo/test/
Author: ecn Date: Thu Apr 4 18:41:41 2013 New Revision: 1464672 URL: http://svn.apache.org/r1464672 Log: ACCUMULO-970 add license header for recently created files Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java?rev=1464672r1=1464671r2=1464672view=diff == --- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java (original) +++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java Thu Apr 4 18:41:41 2013 @@ -1,3 +1,19 @@ +/* + * 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.server.master.state; import org.apache.accumulo.server.master.state.DistributedStoreException; Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1464672r1=1464671r2=1464672view=diff == --- accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java (original) +++ accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java Thu Apr 4 18:41:41 2013 @@ -1,3 +1,19 @@ +/* + * 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; Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java?rev=1464672r1=1464671r2=1464672view=diff == --- accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java (original) +++ accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java Thu Apr 4 18:41:41 2013 @@ -1,3 +1,19 @@ +/* + * 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
svn commit: r1464673 - in /accumulo/trunk: ./ assemble/ core/ examples/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/ server/src/main/java
Author: ecn Date: Thu Apr 4 18:42:20 2013 New Revision: 1464673 URL: http://svn.apache.org/r1464673 Log: ACCUMULO-970 add license header for recently created files Modified: accumulo/trunk/ (props changed) accumulo/trunk/assemble/ (props changed) accumulo/trunk/core/ (props changed) accumulo/trunk/examples/ (props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (props changed) accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (props changed) accumulo/trunk/server/ (props changed) accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java accumulo/trunk/src/ (props changed) accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumulo1235.java Propchange: accumulo/trunk/ -- Merged /accumulo/branches/1.5:r1464672 Propchange: accumulo/trunk/assemble/ -- Merged /accumulo/branches/1.5/assemble:r1464672 Propchange: accumulo/trunk/core/ -- Merged /accumulo/branches/1.5/core:r1464672 Propchange: accumulo/trunk/examples/ -- Merged /accumulo/branches/1.5/examples:r1464672 Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java -- Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1464672 Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java -- Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1464672 Propchange: accumulo/trunk/server/ -- Merged /accumulo/branches/1.5/server:r1464672 Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java?rev=1464673r1=1464672r2=1464673view=diff == --- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java (original) +++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java Thu Apr 4 18:42:20 2013 @@ -1,3 +1,19 @@ +/* + * 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.server.master.state; import org.apache.accumulo.server.master.state.DistributedStoreException; Propchange: accumulo/trunk/src/ -- Merged /accumulo/branches/1.5/src:r1464672 Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1464673r1=1464672r2=1464673view=diff == --- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java (original) +++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java Thu Apr 4 18:42:20 2013 @@ -1,3 +1,19 @@ +/* + * 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 + * + *
svn commit: r1464817 [3/3] - in /accumulo/branches/1.5: ./ assemble/ assemble/deb/accumulo/ conf/examples/1GB/native-standalone/ conf/examples/1GB/standalone/ conf/examples/2GB/native-standalone/ conf
Modified: accumulo/branches/1.5/start/pom.xml URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/start/pom.xml?rev=1464817r1=1464816r2=1464817view=diff == --- accumulo/branches/1.5/start/pom.xml (original) +++ accumulo/branches/1.5/start/pom.xml Fri Apr 5 02:54:02 2013 @@ -16,51 +16,83 @@ limitations under the License. -- project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; - + modelVersion4.0.0/modelVersion parent groupIdorg.apache.accumulo/groupId artifactIdaccumulo/artifactId version1.5.0-SNAPSHOT/version /parent - - modelVersion4.0.0/modelVersion artifactIdaccumulo-start/artifactId nameStart/name - + dependencies +dependency + groupIdcommons-io/groupId + artifactIdcommons-io/artifactId +/dependency +dependency + groupIdcommons-logging/groupId + artifactIdcommons-logging/artifactId +/dependency +dependency + groupIdlog4j/groupId + artifactIdlog4j/artifactId +/dependency +dependency + groupIdorg.apache.commons/groupId + artifactIdcommons-vfs2/artifactId +/dependency +dependency + groupIdjavax.ws.rs/groupId + artifactIdjsr311-api/artifactId + scopetest/scope +/dependency +dependency + groupIdjunit/groupId + artifactIdjunit/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.easymock/groupId + artifactIdeasymock/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-api-easymock/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-core/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-module-junit4/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-reflect/artifactId + scopetest/scope +/dependency + /dependencies build pluginManagement plugins plugin - artifactIdmaven-jar-plugin/artifactId + artifactIdmaven-surefire-plugin/artifactId configuration -outputDirectory../lib/outputDirectory -archive - manifestSections -manifestSection - nameaccumulo/start//name - manifestEntries -Sealedtrue/Sealed - /manifestEntries -/manifestSection - /manifestSections -/archive +forkModealways/forkMode /configuration /plugin -plugin - artifactIdmaven-surefire-plugin/artifactId - configuration -forkModealways/forkMode - /configuration -/plugin - /plugins /pluginManagement /build - profiles -!-- profile for building against Hadoop 1.0.x -Activate by not specifying hadoop.profile -- profile + !-- profile for building against Hadoop 1.0.x + Activate by not specifying hadoop.profile -- idhadoop-1.0/id activation property @@ -71,18 +103,18 @@ dependency groupIdorg.apache.hadoop/groupId artifactIdhadoop-core/artifactId + scopeprovided/scope /dependency dependency groupIdorg.apache.hadoop/groupId artifactIdhadoop-test/artifactId - version${hadoop.version}/version scopetest/scope /dependency /dependencies /profile -!-- profile for building against Hadoop 2.0.x -Activate using: mvn -Dhadoop.profile=2.0 -- profile + !-- profile for building against Hadoop 2.0.x + Activate using: mvn -Dhadoop.profile=2.0 -- idhadoop-2.0/id activation property @@ -94,71 +126,30 @@ dependency groupIdorg.apache.hadoop/groupId artifactIdhadoop-client/artifactId + scopeprovided/scope +/dependency +dependency + groupIdorg.apache.hadoop/groupId + artifactIdhadoop-common/artifactId + scopeprovided/scope +/dependency +dependency + groupIdorg.apache.hadoop/groupId + artifactIdhadoop-hdfs/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.apache.hadoop/groupId + artifactIdhadoop-hdfs/artifactId + typetest-jar/type + scopetest/scope /dependency dependency groupIdorg.apache.hadoop/groupId artifactIdhadoop-minicluster/artifactId - version${hadoop.version}/version scopetest/scope
svn commit: r1464818 [3/3] - in /accumulo/trunk: ./ assemble/ assemble/deb/accumulo/ conf/examples/1GB/native-standalone/ conf/examples/1GB/standalone/ conf/examples/2GB/native-standalone/ conf/exampl
Modified: accumulo/trunk/server/src/test/resources/log4j.properties URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/resources/log4j.properties?rev=1464818r1=1464817r2=1464818view=diff == --- accumulo/trunk/server/src/test/resources/log4j.properties (original) +++ accumulo/trunk/server/src/test/resources/log4j.properties Fri Apr 5 03:31:32 2013 @@ -1,3 +1,18 @@ +# 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. + log4j.rootLogger=INFO, CA log4j.appender.CA=org.apache.log4j.ConsoleAppender log4j.appender.CA.layout=org.apache.log4j.PatternLayout Propchange: accumulo/trunk/src/ -- Merged /accumulo/branches/1.5/src:r1462232-1462246,1462248-1462258,1462260-1462466,1462468-1463545,1463547-1463551,1463554-1463733,1463735-1463743,1463745-1463979,1463981-1463987,1463989-1464091,1464093-1464118,1464120-1464188,1464190-1464193,1464195-1464581,1464583-1464671,1464673-1464817 Modified: accumulo/trunk/start/pom.xml URL: http://svn.apache.org/viewvc/accumulo/trunk/start/pom.xml?rev=1464818r1=1464817r2=1464818view=diff == --- accumulo/trunk/start/pom.xml (original) +++ accumulo/trunk/start/pom.xml Fri Apr 5 03:31:32 2013 @@ -16,51 +16,83 @@ limitations under the License. -- project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; - + modelVersion4.0.0/modelVersion parent groupIdorg.apache.accumulo/groupId artifactIdaccumulo/artifactId version1.6.0-SNAPSHOT/version /parent - - modelVersion4.0.0/modelVersion artifactIdaccumulo-start/artifactId nameStart/name - + dependencies +dependency + groupIdcommons-io/groupId + artifactIdcommons-io/artifactId +/dependency +dependency + groupIdcommons-logging/groupId + artifactIdcommons-logging/artifactId +/dependency +dependency + groupIdlog4j/groupId + artifactIdlog4j/artifactId +/dependency +dependency + groupIdorg.apache.commons/groupId + artifactIdcommons-vfs2/artifactId +/dependency +dependency + groupIdjavax.ws.rs/groupId + artifactIdjsr311-api/artifactId + scopetest/scope +/dependency +dependency + groupIdjunit/groupId + artifactIdjunit/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.easymock/groupId + artifactIdeasymock/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-api-easymock/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-core/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-module-junit4/artifactId + scopetest/scope +/dependency +dependency + groupIdorg.powermock/groupId + artifactIdpowermock-reflect/artifactId + scopetest/scope +/dependency + /dependencies build pluginManagement plugins plugin - artifactIdmaven-jar-plugin/artifactId + artifactIdmaven-surefire-plugin/artifactId configuration -outputDirectory../lib/outputDirectory -archive - manifestSections -manifestSection - nameaccumulo/start//name - manifestEntries -Sealedtrue/Sealed - /manifestEntries -/manifestSection - /manifestSections -/archive +forkModealways/forkMode /configuration /plugin -plugin - artifactIdmaven-surefire-plugin/artifactId - configuration -forkModealways/forkMode - /configuration -/plugin - /plugins /pluginManagement /build - profiles -!-- profile for building against Hadoop 1.0.x -Activate by not specifying