[47/50] [abbrv] Merge branch '1.6'
http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java index 7f2048b,7a1e1ba..c93f680 --- a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java @@@ -16,8 -16,9 +16,9 @@@ */ package org.apache.accumulo.server.util; -import static com.google.common.base.Charsets.UTF_8; ++import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.IOException; - import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.List; http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java index 3543a16,809a7c8..0652cf1 --- a/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java @@@ -16,9 -16,10 +16,9 @@@ */ package org.apache.accumulo.server.util; - import java.io.IOException; - import java.nio.charset.StandardCharsets; -import static com.google.common.base.Charsets.UTF_8; ++import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.IOException; - import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.cli.Help; import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java index f728fec,d40830f..0793c6b --- a/server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java @@@ -16,7 -16,8 +16,8 @@@ */ package org.apache.accumulo.server.util; - import java.nio.charset.StandardCharsets; -import static com.google.common.base.Charsets.UTF_8; ++import static java.nio.charset.StandardCharsets.UTF_8; + import java.util.HashSet; import java.util.Set; http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java index 565eaba,43348df..478b3b5 --- a/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java @@@ -16,10 -16,11 +16,10 @@@ */ package org.apache.accumulo.server.util; -import static com.google.common.base.Charsets.UTF_8; ++import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.PrintStream; import java.io.UnsupportedEncodingException; - import java.nio.charset.StandardCharsets; -- import org.apache.accumulo.core.cli.Help; import org.apache.accumulo.core.util.Base64; import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java index f73747d,be85b1b..8550d0b --- a/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java @@@ -16,7 -16,8 +16,8 @@@ */ package org.apache.accumulo.server.util; - import java.nio.charset.StandardCharsets; -import static com.google.common.base.Charsets.UTF_8; ++import static java.nio.charset.StandardCharsets.UTF_8; + import java.util.Formattable; import java.util.Formatter; import java.util.List; http://git-wip-us.apache.org/repos/asf/accumulo/blob/cfbdef13/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java index 05f28d7,e936b97..01eb477 --- a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java @@@ -16,8 -16,7 +16,9 @@@ */ package org.apache.accumulo.server.util;
[31/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/master/src/main/java/org/apache/accumulo/master/Master.java -- diff --cc server/master/src/main/java/org/apache/accumulo/master/Master.java index 9537f4e,000..83e83cf mode 100644,00..100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java @@@ -1,1315 -1,0 +1,1317 @@@ +/* + * 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; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.impl.Namespaces; +import org.apache.accumulo.core.client.impl.Tables; +import org.apache.accumulo.core.client.impl.ThriftTransportPool; +import org.apache.accumulo.core.client.impl.thrift.TableOperation; +import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType; +import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException; +import org.apache.accumulo.core.conf.AccumuloConfiguration; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.master.state.tables.TableState; +import org.apache.accumulo.core.master.thrift.MasterClientService.Iface; +import org.apache.accumulo.core.master.thrift.MasterClientService.Processor; +import org.apache.accumulo.core.master.thrift.MasterGoalState; +import org.apache.accumulo.core.master.thrift.MasterState; +import org.apache.accumulo.core.master.thrift.TabletServerStatus; +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.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.core.security.NamespacePermission; +import org.apache.accumulo.core.security.SecurityUtil; +import org.apache.accumulo.core.security.TablePermission; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.AgeOffStore; +import org.apache.accumulo.fate.Fate; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; +import org.apache.accumulo.master.recovery.RecoveryManager; +import org.apache.accumulo.master.state.TableCounts; +import org.apache.accumulo.server.Accumulo; +import org.apache.accumulo.server.ServerConstants; +import org.apache.accumulo.server.ServerOpts; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.conf.ServerConfiguration; +import org.apache.accumulo.server.fs.VolumeManager; +import org.apache.accumulo.server.fs.VolumeManager.FileType; +import
[34/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java index 71b7155,000..78f8c7b mode 100644,00..100644 --- a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java +++ b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java @@@ -1,318 -1,0 +1,320 @@@ +/* + * 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.tables; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.security.SecurityPermission; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.NamespaceNotFoundException; +import org.apache.accumulo.core.client.impl.Tables; +import org.apache.accumulo.core.master.state.tables.TableState; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.util.TablePropUtil; +import org.apache.accumulo.server.zookeeper.ZooCache; +import org.apache.accumulo.server.zookeeper.ZooReaderWriter; +import org.apache.log4j.Logger; +import org.apache.zookeeper.KeeperException; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; +import org.apache.zookeeper.Watcher.Event.EventType; + +public class TableManager { + private static SecurityPermission TABLE_MANAGER_PERMISSION = new SecurityPermission(tableManagerPermission); + + private static final Logger log = Logger.getLogger(TableManager.class); + private static final SetTableObserver observers = Collections.synchronizedSet(new HashSetTableObserver()); + private static final MapString,TableState tableStateCache = Collections.synchronizedMap(new HashMapString,TableState()); + private static final byte[] ZERO_BYTE = new byte[] {'0'}; + + private static TableManager tableManager = null; + + private final Instance instance; + private ZooCache zooStateCache; + + public static void prepareNewNamespaceState(String instanceId, String namespaceId, String namespace, NodeExistsPolicy existsPolicy) throws KeeperException, + InterruptedException { +log.debug(Creating ZooKeeper entries for new namespace + namespace + (ID: + namespaceId + )); +String zPath = Constants.ZROOT + / + instanceId + Constants.ZNAMESPACES + / + namespaceId; + +IZooReaderWriter zoo = ZooReaderWriter.getInstance(); +zoo.putPersistentData(zPath, new byte[0], existsPolicy); - zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(Constants.UTF8), existsPolicy); ++zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(UTF_8), existsPolicy); +zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], existsPolicy); + } + + public static void prepareNewTableState(String instanceId, String tableId, String namespaceId, String tableName, TableState state, + NodeExistsPolicy existsPolicy) throws KeeperException, InterruptedException { +// state gets created last +log.debug(Creating ZooKeeper entries for new table + tableName + (ID: + tableId + ) in namespace (ID: + namespaceId + )); +PairString,String qualifiedTableName = Tables.qualify(tableName); +tableName = qualifiedTableName.getSecond(); +String zTablePath = Constants.ZROOT + / + instanceId + Constants.ZTABLES + / + tableId; +IZooReaderWriter zoo = ZooReaderWriter.getInstance(); +
[33/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java index 03635cc,000..9cd02eb mode 100644,00..100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java @@@ -1,1051 -1,0 +1,1053 @@@ +/* + * 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.util; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.concurrent.TimeUnit; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.BatchWriter; +import org.apache.accumulo.core.client.BatchWriterConfig; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.IsolatedScanner; +import org.apache.accumulo.core.client.MutationsRejectedException; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.impl.BatchWriterImpl; +import org.apache.accumulo.core.client.impl.ScannerImpl; +import org.apache.accumulo.core.client.impl.Writer; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.data.PartialKey; +import org.apache.accumulo.core.data.Range; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.metadata.RootTable; +import org.apache.accumulo.core.metadata.schema.DataFileValue; +import org.apache.accumulo.core.metadata.schema.MetadataSchema; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ChoppedColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ClonedColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ScanFileColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.core.tabletserver.log.LogEntry; +import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException; +import org.apache.accumulo.core.util.ColumnFQ; +import org.apache.accumulo.core.util.FastFormat; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; +import org.apache.accumulo.server.ServerConstants; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.fs.FileRef; +import org.apache.accumulo.server.fs.VolumeManager; +import org.apache.accumulo.server.fs.VolumeManagerImpl; +import org.apache.accumulo.server.security.SystemCredentials;
[29/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java -- diff --cc server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java index b1bbb67,000..4f381ef mode 100644,00..100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java @@@ -1,112 -1,0 +1,114 @@@ +/* + * 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 static com.google.common.base.Charsets.UTF_8; ++ +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.NamespaceNotFoundException; +import org.apache.accumulo.core.client.impl.Namespaces; +import org.apache.accumulo.core.client.impl.Tables; +import org.apache.accumulo.core.client.impl.thrift.TableOperation; +import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType; +import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.Repo; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator; +import org.apache.accumulo.master.Master; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.zookeeper.ZooReaderWriter; +import org.apache.log4j.Logger; + +public class RenameTable extends MasterRepo { + + private static final long serialVersionUID = 1L; + private String tableId; + private String oldTableName; + private String newTableName; + private String namespaceId; + + @Override + public long isReady(long tid, Master environment) throws Exception { +return Utils.reserveNamespace(namespaceId, tid, false, true, TableOperation.RENAME) + Utils.reserveTable(tableId, tid, true, true, TableOperation.RENAME); + } + + public RenameTable(String tableId, String oldTableName, String newTableName) throws NamespaceNotFoundException { +this.tableId = tableId; +this.oldTableName = oldTableName; +this.newTableName = newTableName; +Instance inst = HdfsZooInstance.getInstance(); +this.namespaceId = Tables.getNamespaceId(inst, tableId); + } + + @Override + public RepoMaster call(long tid, Master master) throws Exception { + +Instance instance = master.getInstance(); +PairString,String qualifiedOldTableName = Tables.qualify(oldTableName); +PairString,String qualifiedNewTableName = Tables.qualify(newTableName); + +// ensure no attempt is made to rename across namespaces +if (newTableName.contains(.) !namespaceId.equals(Namespaces.getNamespaceId(instance, qualifiedNewTableName.getFirst( + throw new ThriftTableOperationException(tableId, oldTableName, TableOperation.RENAME, TableOperationExceptionType.INVALID_NAME, + Namespace in new table name does not match the old table name); + +IZooReaderWriter zoo = ZooReaderWriter.getInstance(); + +Utils.tableNameLock.lock(); +try { + Utils.checkTableDoesNotExist(instance, newTableName, tableId, TableOperation.RENAME); + + final String newName = qualifiedNewTableName.getSecond(); + final String oldName = qualifiedOldTableName.getSecond(); + + final String tap = ZooUtil.getRoot(instance) + Constants.ZTABLES + / + tableId + Constants.ZTABLE_NAME; + + zoo.mutate(tap, null, null, new Mutator() { +@Override +public byte[] mutate(byte[] current) throws Exception { - final String currentName = new String(current, Constants.UTF8); ++ final String currentName = new String(current, UTF_8); + if (currentName.equals(newName)) +return null; // assume in this case the operation is running again, so we are done + if (!currentName.equals(oldName)) { +throw new
[17/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java -- diff --cc core/src/test/java/org/apache/accumulo/core/data/ValueTest.java index cd26743,000..8022c14 mode 100644,00..100644 --- a/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java +++ b/core/src/test/java/org/apache/accumulo/core/data/ValueTest.java @@@ -1,210 -1,0 +1,211 @@@ +/* + * 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.data; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.nio.ByteBuffer; - import java.nio.charset.Charset; +import java.util.List; + +import org.junit.Before; +import org.junit.Test; + +import static org.easymock.EasyMock.*; +import static org.junit.Assert.*; + +public class ValueTest { + private static final byte[] toBytes(String s) { - return s.getBytes(Charset.forName(UTF-8)); ++return s.getBytes(UTF_8); + } + + private static final byte[] DATA = toBytes(data); + private static final ByteBuffer DATABUFF = ByteBuffer.allocate(DATA.length); + static { +DATABUFF.put(DATA); + } + + @Before + public void setUp() throws Exception { +DATABUFF.rewind(); + } + + @Test + public void testDefault() { +Value v = new Value(); +assertEquals(0, v.get().length); + } + + @Test(expected=NullPointerException.class) + public void testNullBytesConstructor() { +new Value((byte[]) null); + } + + @Test(expected=NullPointerException.class) + public void testNullCopyConstructor() { +new Value((Value) null); + } + + @Test(expected=NullPointerException.class) + public void testNullByteBufferConstructor() { +new Value((ByteBuffer)null); + } + + @Test(expected=NullPointerException.class) + public void testNullSet() { +Value v = new Value(); +v.set(null); + } + + @Test + public void testByteArray() { +Value v = new Value(DATA); +assertArrayEquals(DATA, v.get()); +assertSame(DATA, v.get()); + } + + @Test + public void testByteArrayCopy() { +Value v = new Value(DATA, true); +assertArrayEquals(DATA, v.get()); +assertNotSame(DATA, v.get()); + } + + @Test + public void testByteBuffer() { +Value v = new Value(DATABUFF); +assertArrayEquals(DATA, v.get()); + } + + @Test + public void testByteBufferCopy() { +@SuppressWarnings(deprecation) +Value v = new Value(DATABUFF, true); +assertArrayEquals(DATA, v.get()); + } + + @Test + public void testValueCopy() { +Value ov = createMock(Value.class); +expect(ov.get()).andReturn(DATA); +expect(ov.getSize()).andReturn(4); +replay(ov); +Value v = new Value(ov); +assertArrayEquals(DATA, v.get()); + } + + @Test + public void testByteArrayOffsetLength() { +Value v = new Value(DATA, 0, 4); +assertArrayEquals(DATA, v.get()); + } + + @Test + public void testSet() { +Value v = new Value(); +v.set(DATA); +assertArrayEquals(DATA, v.get()); +assertSame(DATA, v.get()); + } + + @Test + public void testCopy() { +Value v = new Value(); +v.copy(DATA); +assertArrayEquals(DATA, v.get()); +assertNotSame(DATA, v.get()); + } + + @Test + public void testGetSize() { +Value v = new Value(DATA); +assertEquals(DATA.length, v.getSize()); + } + + @Test + public void testGetSizeDefault() { +Value v = new Value(); +assertEquals(0, v.getSize()); + } + + @Test + public void testWriteRead() throws Exception { +Value v = new Value(DATA); +ByteArrayOutputStream baos = new ByteArrayOutputStream(); +DataOutputStream dos = new DataOutputStream(baos); +v.write(dos); +dos.close(); +ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); +DataInputStream dis = new DataInputStream(bais); +Value v2 = new Value(); +v2.readFields(dis);
[12/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java -- diff --cc server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java index 03635cc,000..9cd02eb mode 100644,00..100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java @@@ -1,1051 -1,0 +1,1053 @@@ +/* + * 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.util; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; +import java.util.concurrent.TimeUnit; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.BatchWriter; +import org.apache.accumulo.core.client.BatchWriterConfig; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.IsolatedScanner; +import org.apache.accumulo.core.client.MutationsRejectedException; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.impl.BatchWriterImpl; +import org.apache.accumulo.core.client.impl.ScannerImpl; +import org.apache.accumulo.core.client.impl.Writer; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.data.PartialKey; +import org.apache.accumulo.core.data.Range; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.metadata.RootTable; +import org.apache.accumulo.core.metadata.schema.DataFileValue; +import org.apache.accumulo.core.metadata.schema.MetadataSchema; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ChoppedColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ClonedColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ScanFileColumnFamily; +import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily; +import org.apache.accumulo.core.security.Authorizations; +import org.apache.accumulo.core.security.Credentials; +import org.apache.accumulo.core.tabletserver.log.LogEntry; +import org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException; +import org.apache.accumulo.core.util.ColumnFQ; +import org.apache.accumulo.core.util.FastFormat; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; +import org.apache.accumulo.server.ServerConstants; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.fs.FileRef; +import org.apache.accumulo.server.fs.VolumeManager; +import org.apache.accumulo.server.fs.VolumeManagerImpl; +import org.apache.accumulo.server.security.SystemCredentials;
[41/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/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 103cfe8,000..547ccc7 mode 100644,00..100644 --- 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 @@@ -1,1601 -1,0 +1,1603 @@@ +/* + * 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.client.impl; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Random; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.IsolatedScanner; +import org.apache.accumulo.core.client.IteratorSetting; +import org.apache.accumulo.core.client.NamespaceExistsException; +import org.apache.accumulo.core.client.NamespaceNotFoundException; +import org.apache.accumulo.core.client.RowIterator; +import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.TableDeletedException; +import org.apache.accumulo.core.client.TableExistsException; +import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.TableOfflineException; +import org.apache.accumulo.core.client.admin.DiskUsage; +import org.apache.accumulo.core.client.admin.FindMax; +import org.apache.accumulo.core.client.admin.TableOperations; +import org.apache.accumulo.core.client.admin.TimeType; +import org.apache.accumulo.core.client.impl.TabletLocator.TabletLocation; +import org.apache.accumulo.core.client.impl.thrift.ClientService; +import org.apache.accumulo.core.client.impl.thrift.ClientService.Client; +import org.apache.accumulo.core.client.impl.thrift.TDiskUsage; +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; +import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException; +import org.apache.accumulo.core.conf.AccumuloConfiguration; +import org.apache.accumulo.core.conf.ConfigurationCopy; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.constraints.Constraint; +import org.apache.accumulo.core.data.ByteSequence; +import org.apache.accumulo.core.data.Key; +import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.core.data.Range; +import org.apache.accumulo.core.data.Value; +import org.apache.accumulo.core.iterators.IteratorUtil; +import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope; +import org.apache.accumulo.core.iterators.SortedKeyValueIterator; +import org.apache.accumulo.core.master.state.tables.TableState; +import org.apache.accumulo.core.master.thrift.FateOperation; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.metadata.MetadataServicer; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.metadata.RootTable; +import
[25/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java -- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java index 0e02f05,000..7158ea8 mode 100644,00..100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java @@@ -1,598 -1,0 +1,598 @@@ +/* + * 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.log; + ++import static com.google.common.base.Charsets.UTF_8; +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH; +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START; +import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET; +import static org.apache.accumulo.tserver.logger.LogEvents.MANY_MUTATIONS; +import static org.apache.accumulo.tserver.logger.LogEvents.OPEN; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.OutputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.nio.channels.ClosedChannelException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.LinkedBlockingQueue; + - import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.conf.AccumuloConfiguration; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.core.data.Mutation; +import org.apache.accumulo.core.security.crypto.CryptoModule; +import org.apache.accumulo.core.security.crypto.CryptoModuleFactory; +import org.apache.accumulo.core.security.crypto.CryptoModuleParameters; +import org.apache.accumulo.core.security.crypto.DefaultCryptoModule; +import org.apache.accumulo.core.security.crypto.NoFlushOutputStream; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.LoggingRunnable; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.StringUtil; +import org.apache.accumulo.server.ServerConstants; +import org.apache.accumulo.server.fs.VolumeManager; +import org.apache.accumulo.server.master.state.TServerInstance; +import org.apache.accumulo.tserver.TabletMutations; +import org.apache.accumulo.tserver.logger.LogFileKey; +import org.apache.accumulo.tserver.logger.LogFileValue; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.Path; +import org.apache.log4j.Logger; + +/** + * Wrap a connection to a logger. + * + */ +public class DfsLogger { + public static final String LOG_FILE_HEADER_V2 = --- Log File Header (v2) ---; + public static final String LOG_FILE_HEADER_V3 = --- Log File Header (v3) ---; + + private static Logger log = Logger.getLogger(DfsLogger.class); + + public static class LogClosedException extends IOException { +private static final long serialVersionUID = 1L; + +public LogClosedException() { + super(LogClosed); +} + } + + /** + * A well-timed tabletserver failure could result in an incomplete header written to a write-ahead log. This exception is thrown when the header cannot be + * read from a WAL which should only happen when the tserver dies as described. + */ + public static class LogHeaderIncompleteException extends IOException { +private static final long serialVersionUID = 1l; + +public LogHeaderIncompleteException(String msg) { + super(msg); +} + +public LogHeaderIncompleteException(String msg, Throwable cause) { + super(msg, cause); +} + +public LogHeaderIncompleteException(Throwable cause) { + super(cause); +}
[39/50] [abbrv] Merge branch '1.5' into 1.6
http://git-wip-us.apache.org/repos/asf/accumulo/blob/9b20a9d4/core/src/main/java/org/apache/accumulo/core/data/Condition.java -- diff --cc core/src/main/java/org/apache/accumulo/core/data/Condition.java index bfd4818,000..e6e31eb mode 100644,00..100644 --- a/core/src/main/java/org/apache/accumulo/core/data/Condition.java +++ b/core/src/main/java/org/apache/accumulo/core/data/Condition.java @@@ -1,238 -1,0 +1,239 @@@ +/* + * 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.data; + ++import static com.google.common.base.Charsets.UTF_8; ++ +import java.util.Arrays; +import java.util.HashSet; + - import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.IteratorSetting; +import org.apache.accumulo.core.security.ColumnVisibility; +import org.apache.accumulo.core.util.ArgumentChecker; +import org.apache.hadoop.io.Text; + +/** + * Conditions that must be met on a particular column in a row. + * + * @since 1.6.0 + */ +public class Condition { + + private ByteSequence cf; + private ByteSequence cq; + private ByteSequence cv; + private ByteSequence val; + private Long ts; + private IteratorSetting iterators[] = new IteratorSetting[0]; + private static final ByteSequence EMPTY = new ArrayByteSequence(new byte[0]); + + + public Condition(CharSequence cf, CharSequence cq) { +ArgumentChecker.notNull(cf, cq); - this.cf = new ArrayByteSequence(cf.toString().getBytes(Constants.UTF8)); - this.cq = new ArrayByteSequence(cq.toString().getBytes(Constants.UTF8)); ++this.cf = new ArrayByteSequence(cf.toString().getBytes(UTF_8)); ++this.cq = new ArrayByteSequence(cq.toString().getBytes(UTF_8)); +this.cv = EMPTY; + } + + public Condition(byte[] cf, byte[] cq) { +ArgumentChecker.notNull(cf, cq); +this.cf = new ArrayByteSequence(cf); +this.cq = new ArrayByteSequence(cq); +this.cv = EMPTY; + } + + public Condition(Text cf, Text cq) { +ArgumentChecker.notNull(cf, cq); +this.cf = new ArrayByteSequence(cf.getBytes(), 0, cf.getLength()); +this.cq = new ArrayByteSequence(cq.getBytes(), 0, cq.getLength()); +this.cv = EMPTY; + } + + public Condition(ByteSequence cf, ByteSequence cq) { +ArgumentChecker.notNull(cf, cq); +this.cf = cf; +this.cq = cq; +this.cv = EMPTY; + } + + public ByteSequence getFamily() { +return cf; + } + + public ByteSequence getQualifier() { +return cq; + } + + /** + * Sets the version for the column to check. If this is not set then the latest column will be checked, unless iterators do something different. + * + * @return returns this + */ + + public Condition setTimestamp(long ts) { +this.ts = ts; +return this; + } + + public Long getTimestamp() { +return ts; + } + + /** + * see {@link #setValue(byte[])} + * + * @return returns this + */ + + public Condition setValue(CharSequence value) { +ArgumentChecker.notNull(value); - this.val = new ArrayByteSequence(value.toString().getBytes(Constants.UTF8)); ++this.val = new ArrayByteSequence(value.toString().getBytes(UTF_8)); +return this; + } + + /** + * This method sets the expected value of a column. Inorder for the condition to pass the column must exist and have this value. If a value is not set, then + * the column must be absent for the condition to pass. + * + * @return returns this + */ + + public Condition setValue(byte[] value) { +ArgumentChecker.notNull(value); +this.val = new ArrayByteSequence(value); +return this; + } + + /** + * see {@link #setValue(byte[])} + * + * @return returns this + */ + + public Condition setValue(Text value) { +ArgumentChecker.notNull(value); +this.val = new ArrayByteSequence(value.getBytes(), 0, value.getLength()); +return this; + } + + /** + * see {@link #setValue(byte[])} + * + * @return returns this + */ + + public Condition setValue(ByteSequence value) { +ArgumentChecker.notNull(value); +
[06/10] accumulo git commit: Merge remote-tracking branch 'origin/master' into ACCUMULO-3147
Merge remote-tracking branch 'origin/master' into ACCUMULO-3147 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fa717c91 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fa717c91 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fa717c91 Branch: refs/heads/master Commit: fa717c916201f94801b4d2d1d0f0695f14d1843b Parents: e840549 b5d7b94 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 7 12:40:31 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 7 12:40:31 2014 -0500 -- .../accumulo/server/util/MetadataTableUtil.java | 2 +- .../accumulo/test/functional/CloneTestIT.java | 90 +++- 2 files changed, 90 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fa717c91/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java --
[10/10] accumulo git commit: Merge branch 'ACCUMULO-3147'
Merge branch 'ACCUMULO-3147' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/34ca056b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/34ca056b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/34ca056b Branch: refs/heads/master Commit: 34ca056b35fdfe60d782241ef72a44d04986080c Parents: 5aff1fb bc62474 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 7 17:29:26 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 7 17:29:26 2014 -0500 -- .../client/impl/ReplicationOperationsImpl.java | 11 +- .../accumulo/core/client/mock/MockAccumulo.java | 2 + .../core/client/mock/MockTableOperations.java | 8 +- .../replication/PrintReplicationRecords.java| 4 +- .../core/replication/ReplicaSystemHelper.java | 11 +- .../core/replication/ReplicationConstants.java | 1 - .../core/replication/ReplicationTable.java | 99 .../ReplicationTableOfflineException.java | 32 +++ .../ReplicationOperationsImplTest.java | 22 +- .../apache/accumulo/server/ServerConstants.java | 8 +- .../server/constraints/MetadataConstraints.java | 119 +- .../apache/accumulo/server/init/Initialize.java | 174 +- .../server/replication/ReplicationTable.java| 227 --- .../server/replication/ReplicationUtil.java | 47 ++-- .../server/security/SecurityOperation.java | 3 +- .../accumulo/server/util/MetadataTableUtil.java | 24 +- .../replication/ReplicationTableTest.java | 132 --- .../gc/GarbageCollectWriteAheadLogs.java| 42 ++-- .../accumulo/gc/SimpleGarbageCollector.java | 7 +- .../CloseWriteAheadLogReferences.java | 16 +- .../gc/GarbageCollectWriteAheadLogsTest.java| 37 ++- .../CloseWriteAheadLogReferencesTest.java | 15 +- .../accumulo/master/FateServiceHandler.java | 3 +- .../java/org/apache/accumulo/master/Master.java | 21 +- .../master/metrics/ReplicationMetrics.java | 7 +- .../DistributedWorkQueueWorkAssigner.java | 20 +- .../master/replication/FinishedWorkUpdater.java | 15 +- .../RemoveCompleteReplicationRecords.java | 12 +- .../master/replication/StatusMaker.java | 57 ++--- .../accumulo/master/replication/WorkMaker.java | 12 +- .../accumulo/master/util/TableValidators.java | 26 ++- .../replication/FinishedWorkUpdaterTest.java| 16 +- .../RemoveCompleteReplicationRecordsTest.java | 9 +- .../replication/SequentialWorkAssignerTest.java | 16 +- .../master/replication/StatusMakerTest.java | 2 +- .../replication/UnorderedWorkAssignerTest.java | 18 +- .../master/replication/WorkMakerTest.java | 17 +- .../monitor/servlets/ReplicationServlet.java| 5 +- .../replication/ReplicationProcessor.java | 8 +- .../apache/accumulo/test/LargeSplitRowIT.java | 5 +- .../test/MasterRepairsDualAssignmentIT.java | 8 +- .../accumulo/test/MetaConstraintRetryIT.java| 7 +- .../org/apache/accumulo/test/NamespacesIT.java | 6 +- .../org/apache/accumulo/test/ShellServerIT.java | 17 +- .../apache/accumulo/test/WaitForBalanceIT.java | 14 +- .../replication/MultiInstanceReplicationIT.java | 21 +- .../test/replication/ReplicationIT.java | 210 +++-- .../test/replication/StatusCombinerMacTest.java | 20 +- .../UnorderedWorkAssignerReplicationIT.java | 14 +- 49 files changed, 800 insertions(+), 827 deletions(-) --
[04/10] accumulo git commit: ACCUMULO-3147 Create replication table at initialize, upgrade
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e840549a/server/gc/src/test/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferencesTest.java -- diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferencesTest.java b/server/gc/src/test/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferencesTest.java index 4d99495..86ac87e 100644 --- a/server/gc/src/test/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferencesTest.java +++ b/server/gc/src/test/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferencesTest.java @@ -53,7 +53,6 @@ import org.apache.accumulo.core.replication.proto.Replication.Status; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.tabletserver.log.LogEntry; -import org.apache.accumulo.server.replication.ReplicationUtil; import org.apache.hadoop.io.Text; import org.easymock.IAnswer; import org.junit.Assert; @@ -98,7 +97,7 @@ public class CloseWriteAheadLogReferencesTest { data.add(Maps.immutableEntry(new Key(logEntry.getRow(), logEntry.getColumnFamily(), logEntry.getColumnQualifier()), new Value(logEntry.getValue(; // Get a batchscanner, scan the tablets section, fetch only the logs -expect(conn.createBatchScanner(MetadataTable.NAME, new Authorizations(), 4)).andReturn(bs); +expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); bs.setRanges(Collections.singleton(TabletsSection.getRange())); expectLastCall().once(); bs.fetchColumnFamily(LogColumnFamily.NAME); @@ -141,7 +140,7 @@ public class CloseWriteAheadLogReferencesTest { data.add(Maps.immutableEntry(new Key(logEntry.getRow(), logEntry.getColumnFamily(), logEntry.getColumnQualifier()), new Value(logEntry.getValue(; // Get a batchscanner, scan the tablets section, fetch only the logs -expect(conn.createBatchScanner(MetadataTable.NAME, new Authorizations(), 4)).andReturn(bs); +expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); bs.setRanges(Collections.singleton(TabletsSection.getRange())); expectLastCall().once(); bs.fetchColumnFamily(LogColumnFamily.NAME); @@ -197,7 +196,7 @@ public class CloseWriteAheadLogReferencesTest { data.add(Maps.immutableEntry(new Key(logEntry.getRow(), logEntry.getColumnFamily(), logEntry.getColumnQualifier()), new Value(logEntry.getValue(; // Get a batchscanner, scan the tablets section, fetch only the logs -expect(conn.createBatchScanner(MetadataTable.NAME, new Authorizations(), 4)).andReturn(bs); +expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); bs.setRanges(Collections.singleton(TabletsSection.getRange())); expectLastCall().once(); bs.fetchColumnFamily(LogColumnFamily.NAME); @@ -277,7 +276,7 @@ public class CloseWriteAheadLogReferencesTest { data.add(Maps.immutableEntry(new Key(logEntry.getRow(), logEntry.getColumnFamily(), logEntry.getColumnQualifier()), new Value(logEntry.getValue(; // Get a batchscanner, scan the tablets section, fetch only the logs -expect(conn.createBatchScanner(MetadataTable.NAME, new Authorizations(), 4)).andReturn(bs); +expect(conn.createBatchScanner(MetadataTable.NAME, Authorizations.EMPTY, 4)).andReturn(bs); bs.setRanges(Collections.singleton(TabletsSection.getRange())); expectLastCall().once(); bs.fetchColumnFamily(LogColumnFamily.NAME); @@ -309,7 +308,6 @@ public class CloseWriteAheadLogReferencesTest { Instance inst = new MockInstance(testName.getMethodName()); Connector conn = inst.getConnector(root, new PasswordToken()); -ReplicationUtil.createReplicationTable(conn); BatchWriter bw = conn.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig()); Mutation m = new Mutation(ReplicationSection.getRowPrefix() + file:/accumulo/wal/tserver+port/12345); m.put(ReplicationSection.COLF, new Text(1), StatusUtil.fileCreatedValue(System.currentTimeMillis())); @@ -331,7 +329,6 @@ public class CloseWriteAheadLogReferencesTest { Instance inst = new MockInstance(testName.getMethodName()); Connector conn = inst.getConnector(root, new PasswordToken()); -ReplicationUtil.createReplicationTable(conn); BatchWriter bw = conn.createBatchWriter(MetadataTable.NAME, new BatchWriterConfig()); Mutation m = new Mutation(ReplicationSection.getRowPrefix() + file); m.put(ReplicationSection.COLF, new Text(1), StatusUtil.fileCreatedValue(System.currentTimeMillis())); @@ -353,8 +350,7 @@ public class CloseWriteAheadLogReferencesTest { Instance inst = new MockInstance(testName.getMethodName()); Connector conn = inst.getConnector(root, new PasswordToken()); -
[08/10] accumulo git commit: ACCUMULO-3147 Fix ReplicationServlet
ACCUMULO-3147 Fix ReplicationServlet Properly show an informative banner message when the replication table is offline. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5cf1888e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5cf1888e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5cf1888e Branch: refs/heads/master Commit: 5cf1888eb402dd3d22e94decedb75fb86a2264b1 Parents: 5753e16 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 7 15:12:39 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 7 15:12:39 2014 -0500 -- .../apache/accumulo/monitor/servlets/ReplicationServlet.java| 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/5cf1888e/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java -- diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java index 7d3cb14..94765f8 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java @@ -28,6 +28,7 @@ import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.admin.TableOperations; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; import org.apache.accumulo.core.replication.ReplicationConstants; +import org.apache.accumulo.core.replication.ReplicationTable; import org.apache.accumulo.core.replication.ReplicationTarget; import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.zookeeper.ZooUtil; @@ -75,6 +76,10 @@ public class ReplicationServlet extends BasicServlet { int totalWorkQueueSize = replicationUtil.getMaxReplicationThreads(systemProps, mmi); TableOperations tops = conn.tableOperations(); +if (!ReplicationTable.isOnline(conn)) { + banner(sb, , Replication table is offline); + return; +} Table replicationStats = new Table(replicationStats, Replication Status); replicationStats.addSortableColumn(Table);
[02/10] accumulo git commit: ACCUMULO-3147 Refactor ReplicationTable constants
ACCUMULO-3147 Refactor ReplicationTable constants Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f1a47b38 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f1a47b38 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f1a47b38 Branch: refs/heads/master Commit: f1a47b38d3f5338a9ad1104cd3009b327e08c371 Parents: cc48e37 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Oct 29 15:11:48 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Nov 6 18:39:54 2014 -0500 -- .../client/impl/ReplicationOperationsImpl.java | 8 +- .../replication/PrintReplicationRecords.java| 2 +- .../core/replication/ReplicaSystemHelper.java | 11 +- .../core/replication/ReplicationConstants.java | 1 - .../core/replication/ReplicationTable.java | 61 + .../ReplicationOperationsImplTest.java | 24 +- .../server/replication/ReplicationTable.java| 227 --- .../server/replication/ReplicationUtil.java | 184 +-- .../replication/ReplicationTableTest.java | 11 +- .../gc/GarbageCollectWriteAheadLogs.java| 2 +- .../accumulo/gc/SimpleGarbageCollector.java | 4 +- .../CloseWriteAheadLogReferences.java | 2 +- .../gc/GarbageCollectWriteAheadLogsTest.java| 36 ++- .../CloseWriteAheadLogReferencesTest.java | 9 +- .../master/metrics/ReplicationMetrics.java | 4 +- .../DistributedWorkQueueWorkAssigner.java | 12 +- .../master/replication/FinishedWorkUpdater.java | 5 +- .../RemoveCompleteReplicationRecords.java | 4 +- .../master/replication/StatusMaker.java | 45 ++-- .../accumulo/master/replication/WorkMaker.java | 2 +- .../replication/FinishedWorkUpdaterTest.java| 15 +- .../RemoveCompleteReplicationRecordsTest.java | 13 +- .../replication/SequentialWorkAssignerTest.java | 11 +- .../master/replication/StatusMakerTest.java | 2 +- .../replication/UnorderedWorkAssignerTest.java | 16 +- .../master/replication/WorkMakerTest.java | 2 +- .../monitor/servlets/ReplicationServlet.java| 3 +- .../replication/ReplicationProcessor.java | 2 +- .../replication/MultiInstanceReplicationIT.java | 6 +- .../test/replication/ReplicationIT.java | 18 +- .../test/replication/StatusCombinerMacTest.java | 5 +- .../UnorderedWorkAssignerReplicationIT.java | 7 +- 32 files changed, 393 insertions(+), 361 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1a47b38/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java index f820aa4..a8f3f21 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java @@ -44,8 +44,8 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema; import org.apache.accumulo.core.metadata.schema.MetadataSchema.ReplicationSection; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily; import org.apache.accumulo.core.protobuf.ProtobufUtil; -import org.apache.accumulo.core.replication.ReplicationConstants; import org.apache.accumulo.core.replication.ReplicationSchema.OrderSection; +import org.apache.accumulo.core.replication.ReplicationTable; import org.apache.accumulo.core.replication.StatusUtil; import org.apache.accumulo.core.replication.proto.Replication.Status; import org.apache.accumulo.core.security.Authorizations; @@ -152,7 +152,7 @@ public class ReplicationOperationsImpl implements ReplicationOperations { log.info(reading from replication table); boolean allReplicationRefsReplicated = false; while (!allReplicationRefsReplicated) { - BatchScanner bs = conn.createBatchScanner(ReplicationConstants.TABLE_NAME, Authorizations.EMPTY, 4); + BatchScanner bs = conn.createBatchScanner(ReplicationTable.NAME, Authorizations.EMPTY, 4); bs.setRanges(Collections.singleton(new Range())); try { allReplicationRefsReplicated = allReferencesReplicated(bs, tableId, wals); @@ -216,7 +216,7 @@ public class ReplicationOperationsImpl implements ReplicationOperations { protected Text getTableId(Connector conn, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { TableOperations tops = conn.tableOperations(); -while (!tops.exists(ReplicationConstants.TABLE_NAME)) { +while
[05/10] accumulo git commit: ACCUMULO-3147 Create replication table at initialize, upgrade
ACCUMULO-3147 Create replication table at initialize, upgrade Migrate to all replication code to a built-in system-managed replication table instead of the user-space one. Ensure all replication-related tests pass. Also fix a small bug in Mock which threw an exception when using deleteRows with null start and end rows. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e840549a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e840549a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e840549a Branch: refs/heads/master Commit: e840549a9c6376c8c5dbe9663e14b4987c10dc5e Parents: f1a47b3 Author: Christopher Tubbs ctubb...@apache.org Authored: Sat Nov 1 18:53:14 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Nov 6 18:39:55 2014 -0500 -- .../client/impl/ReplicationOperationsImpl.java | 5 +- .../accumulo/core/client/mock/MockAccumulo.java | 2 + .../core/client/mock/MockTableOperations.java | 8 +- .../replication/PrintReplicationRecords.java| 2 +- .../core/replication/ReplicationTable.java | 51 - .../ReplicationTableOfflineException.java | 32 +++ .../ReplicationOperationsImplTest.java | 22 +-- .../apache/accumulo/server/ServerConstants.java | 8 +- .../server/constraints/MetadataConstraints.java | 119 ++- .../apache/accumulo/server/init/Initialize.java | 174 ++-- .../server/replication/ReplicationUtil.java | 149 +- .../server/security/SecurityOperation.java | 3 +- .../accumulo/server/util/MetadataTableUtil.java | 24 ++- .../replication/ReplicationTableTest.java | 133 - .../gc/GarbageCollectWriteAheadLogs.java| 40 ++-- .../accumulo/gc/SimpleGarbageCollector.java | 3 +- .../CloseWriteAheadLogReferences.java | 14 +- .../gc/GarbageCollectWriteAheadLogsTest.java| 9 +- .../CloseWriteAheadLogReferencesTest.java | 14 +- .../accumulo/master/FateServiceHandler.java | 3 +- .../java/org/apache/accumulo/master/Master.java | 21 +- .../master/metrics/ReplicationMetrics.java | 5 +- .../DistributedWorkQueueWorkAssigner.java | 8 +- .../master/replication/FinishedWorkUpdater.java | 10 +- .../RemoveCompleteReplicationRecords.java | 8 +- .../master/replication/StatusMaker.java | 16 +- .../accumulo/master/replication/WorkMaker.java | 10 +- .../accumulo/master/util/TableValidators.java | 26 ++- .../replication/FinishedWorkUpdaterTest.java| 7 - .../RemoveCompleteReplicationRecordsTest.java | 8 +- .../replication/SequentialWorkAssignerTest.java | 15 +- .../replication/UnorderedWorkAssignerTest.java | 10 +- .../master/replication/WorkMakerTest.java | 15 +- .../monitor/servlets/ReplicationServlet.java| 5 - .../replication/ReplicationProcessor.java | 6 +- .../apache/accumulo/test/LargeSplitRowIT.java | 5 +- .../test/MasterRepairsDualAssignmentIT.java | 8 +- .../accumulo/test/MetaConstraintRetryIT.java| 7 +- .../org/apache/accumulo/test/NamespacesIT.java | 6 +- .../org/apache/accumulo/test/ShellServerIT.java | 17 +- .../apache/accumulo/test/WaitForBalanceIT.java | 14 +- .../replication/MultiInstanceReplicationIT.java | 19 +- .../test/replication/ReplicationIT.java | 198 +-- .../test/replication/StatusCombinerMacTest.java | 19 +- .../UnorderedWorkAssignerReplicationIT.java | 11 +- 45 files changed, 612 insertions(+), 677 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e840549a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java index a8f3f21..cd57c2f 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ReplicationOperationsImpl.java @@ -61,7 +61,7 @@ import org.slf4j.LoggerFactory; import com.google.protobuf.InvalidProtocolBufferException; /** - * + * */ public class ReplicationOperationsImpl implements ReplicationOperations { private static final Logger log = LoggerFactory.getLogger(ReplicationOperationsImpl.class); @@ -216,9 +216,6 @@ public class ReplicationOperationsImpl implements ReplicationOperations { protected Text getTableId(Connector conn, String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException { TableOperations tops = conn.tableOperations(); -while
[01/10] accumulo git commit: ACCUMULO-3147 Refactor ReplicationTable constants
Repository: accumulo Updated Branches: refs/heads/master 5aff1fb7b - 34ca056b3 http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1a47b38/server/master/src/test/java/org/apache/accumulo/master/replication/UnorderedWorkAssignerTest.java -- diff --git a/server/master/src/test/java/org/apache/accumulo/master/replication/UnorderedWorkAssignerTest.java b/server/master/src/test/java/org/apache/accumulo/master/replication/UnorderedWorkAssignerTest.java index 2199808..5d69216 100644 --- a/server/master/src/test/java/org/apache/accumulo/master/replication/UnorderedWorkAssignerTest.java +++ b/server/master/src/test/java/org/apache/accumulo/master/replication/UnorderedWorkAssignerTest.java @@ -41,13 +41,14 @@ import org.apache.accumulo.core.protobuf.ProtobufUtil; import org.apache.accumulo.core.replication.ReplicationConstants; import org.apache.accumulo.core.replication.ReplicationSchema.OrderSection; import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection; +import org.apache.accumulo.core.replication.ReplicationTable; import org.apache.accumulo.core.replication.ReplicationTarget; import org.apache.accumulo.core.replication.StatusUtil; import org.apache.accumulo.core.replication.proto.Replication.Status; import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.server.replication.DistributedWorkQueueWorkAssignerHelper; -import org.apache.accumulo.server.replication.ReplicationTable; +import org.apache.accumulo.server.replication.ReplicationUtil; import org.apache.accumulo.server.zookeeper.DistributedWorkQueue; import org.apache.accumulo.server.zookeeper.ZooCache; import org.apache.hadoop.fs.Path; @@ -85,9 +86,10 @@ public class UnorderedWorkAssignerTest { Path p = new Path(/accumulo/wal/tserver+port/ + UUID.randomUUID()); -String expectedQueueKey = p.getName() + DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR + target.getPeerName() + DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR -+ target.getRemoteIdentifier() + DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR + target.getSourceTableId(); - +String expectedQueueKey = p.getName() + DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR + target.getPeerName() ++ DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR + target.getRemoteIdentifier() + DistributedWorkQueueWorkAssignerHelper.KEY_SEPARATOR ++ target.getSourceTableId(); + workQueue.addWork(expectedQueueKey, p.toString()); expectLastCall().once(); @@ -135,7 +137,7 @@ public class UnorderedWorkAssignerTest { assigner.setConnector(conn); // Create and grant ourselves write to the replication table -ReplicationTable.create(conn); +ReplicationUtil.createReplicationTable(conn); conn.securityOperations().grantTablePermission(root, ReplicationTable.NAME, TablePermission.WRITE); Status.Builder builder = Status.newBuilder().setBegin(0).setEnd(0).setInfiniteEnd(true).setClosed(false).setCreatedTime(5l); @@ -198,7 +200,7 @@ public class UnorderedWorkAssignerTest { assigner.setConnector(conn); // Create and grant ourselves write to the replication table -ReplicationTable.create(conn); +ReplicationUtil.createReplicationTable(conn); conn.securityOperations().grantTablePermission(root, ReplicationTable.NAME, TablePermission.WRITE); // Create two mutations, both of which need replication work done @@ -270,7 +272,7 @@ public class UnorderedWorkAssignerTest { assigner.setConnector(conn); // Create and grant ourselves write to the replication table -ReplicationTable.create(conn); +ReplicationUtil.createReplicationTable(conn); conn.securityOperations().grantTablePermission(root, ReplicationTable.NAME, TablePermission.WRITE); // Create two mutations, both of which need replication work done http://git-wip-us.apache.org/repos/asf/accumulo/blob/f1a47b38/server/master/src/test/java/org/apache/accumulo/master/replication/WorkMakerTest.java -- diff --git a/server/master/src/test/java/org/apache/accumulo/master/replication/WorkMakerTest.java b/server/master/src/test/java/org/apache/accumulo/master/replication/WorkMakerTest.java index d486ded..280ca82 100644 --- a/server/master/src/test/java/org/apache/accumulo/master/replication/WorkMakerTest.java +++ b/server/master/src/test/java/org/apache/accumulo/master/replication/WorkMakerTest.java @@ -33,11 +33,11 @@ import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.replication.ReplicationSchema.StatusSection; import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection; +import org.apache.accumulo.core.replication.ReplicationTable; import
[1/2] accumulo git commit: ACCUMULO-3231 Remove unused imports; fix javadocs
Repository: accumulo Updated Branches: refs/heads/master 3922e1ab4 - 566839ef7 ACCUMULO-3231 Remove unused imports; fix javadocs Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e62b997c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e62b997c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e62b997c Branch: refs/heads/master Commit: e62b997c14b79f5449bef240cd96133db4ab6a48 Parents: 3922e1a Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 7 18:40:58 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 7 18:40:58 2014 -0500 -- .../test/replication/merkle/cli/ManualComparison.java | 7 ++- .../accumulo/test/replication/merkle/skvi/DigestIterator.java | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e62b997c/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/ManualComparison.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/ManualComparison.java b/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/ManualComparison.java index 9f52233..c1d6337 100644 --- a/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/ManualComparison.java +++ b/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/ManualComparison.java @@ -35,16 +35,13 @@ import com.beust.jcommander.Parameter; public class ManualComparison { public static class ManualComparisonOpts extends ClientOpts { -@Parameter(names={--table1}, required = true, description = First table) +@Parameter(names = {--table1}, required = true, description = First table) public String table1; -@Parameter(names={--table2}, required = true, description = First table) +@Parameter(names = {--table2}, required = true, description = First table) public String table2; } - /** - * @param args - */ public static void main(String[] args) throws Exception { ManualComparisonOpts opts = new ManualComparisonOpts(); opts.parseArgs(ManualComparison, args); http://git-wip-us.apache.org/repos/asf/accumulo/blob/e62b997c/test/src/main/java/org/apache/accumulo/test/replication/merkle/skvi/DigestIterator.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/replication/merkle/skvi/DigestIterator.java b/test/src/main/java/org/apache/accumulo/test/replication/merkle/skvi/DigestIterator.java index dcda76a..5fa9a5f 100644 --- a/test/src/main/java/org/apache/accumulo/test/replication/merkle/skvi/DigestIterator.java +++ b/test/src/main/java/org/apache/accumulo/test/replication/merkle/skvi/DigestIterator.java @@ -30,8 +30,6 @@ import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.iterators.IteratorEnvironment; import org.apache.accumulo.core.iterators.SortedKeyValueIterator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * {@link SortedKeyValueIterator} which attempts to compute a hash over some range of Key-Value pairs. @@ -40,7 +38,6 @@ import org.slf4j.LoggerFactory; * Range. If the (Batch)Scanner stops and restarts in the middle of a session, incorrect values will be returned and the merkle tree will be invalid. */ public class DigestIterator implements SortedKeyValueIteratorKey,Value { - private static final Logger log = LoggerFactory.getLogger(DigestIterator.class); public static final String HASH_NAME_KEY = hash.name; private MessageDigest digest;
[2/2] accumulo git commit: ACCUMULO-898 Suppress warning for serial version on old TInfo
ACCUMULO-898 Suppress warning for serial version on old TInfo Thrift generated sources always suppressed these warnings. However, it should be noted that if anybody had actually serialized this class, its computed serialVersionUID will not match. This might limit the usefulness of including this for any desired backwards-compatibility reasons. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/566839ef Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/566839ef Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/566839ef Branch: refs/heads/master Commit: 566839ef791989ea69ec58574a6d2f51a7be9558 Parents: e62b997 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 7 18:46:23 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 7 18:46:23 2014 -0500 -- trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/566839ef/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java -- diff --git a/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java b/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java index fc6388f..f6f5756 100644 --- a/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java +++ b/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java @@ -19,7 +19,6 @@ package org.apache.accumulo.trace.thrift; /** * @deprecated since 1.7, use {@link org.apache.accumulo.core.trace.thrift.TInfo} instead */ +@SuppressWarnings(serial) @Deprecated -public class TInfo extends org.apache.accumulo.core.trace.thrift.TInfo { -} - +public class TInfo extends org.apache.accumulo.core.trace.thrift.TInfo {}
[1/3] accumulo git commit: ACCUMULO-3318 Remove extraneous javadoc tag without description
Repository: accumulo Updated Branches: refs/heads/1.6 1f3288b20 - 844d9edc9 refs/heads/master 6236c4d47 - bedbca567 ACCUMULO-3318 Remove extraneous javadoc tag without description Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/844d9edc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/844d9edc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/844d9edc Branch: refs/heads/1.6 Commit: 844d9edc99e6672dbcfbde2b421d267fd8599687 Parents: 1f3288b Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 10 14:56:19 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 10 14:56:19 2014 -0500 -- core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/844d9edc/core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java b/core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java index 69cc242..29f7fb7 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java +++ b/core/src/main/java/org/apache/accumulo/core/util/ThriftUtil.java @@ -425,7 +425,6 @@ public class ThriftUtil { * * @param socket * The Socket - * @return */ private Socket overrideProtocol(final Socket socket) { if (socket instanceof SSLSocket) {
[5/6] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/091f70cd Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/091f70cd Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/091f70cd Branch: refs/heads/1.6 Commit: 091f70cd5365942aee63c5040f826fffe246f93e Parents: b68bdae 1835c27 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 17 13:45:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 17 13:45:13 2014 -0500 -- .../apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/091f70cd/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index d45ef0f,000..7283c19 mode 100644,00..100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java @@@ -1,873 -1,0 +1,874 @@@ +/* + * 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.minicluster.impl; + +import static com.google.common.base.Charsets.UTF_8; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileFilter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import org.apache.accumulo.cluster.AccumuloCluster; +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.ClientConfiguration; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.ConfigurationCopy; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterGoalState; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.StringUtil; +import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.gc.SimpleGarbageCollector; +import org.apache.accumulo.master.Master; +import
[3/6] accumulo git commit: ACCUMULO-3340 Restrict ZooKeeper binding in MAC
ACCUMULO-3340 Restrict ZooKeeper binding in MAC Forces ZooKeeper to bind only to 127.0.0.1 in MiniAccumuloCluster, instead of the default, which is to bind to all interfaces. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1835c27c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1835c27c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1835c27c Branch: refs/heads/master Commit: 1835c27ca41426ddd570cde14f9612c45680b917 Parents: a8a6b15 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 17 13:40:00 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 17 13:40:00 2014 -0500 -- .../java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1835c27c/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java index f839f39..53f51f7 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java @@ -296,6 +296,7 @@ public class MiniAccumuloCluster { zooCfg.setProperty(tickTime, 1000); zooCfg.setProperty(initLimit, 10); zooCfg.setProperty(syncLimit, 5); +zooCfg.setProperty(clientPortAddress, 127.0.0.1); zooCfg.setProperty(clientPort, zooKeeperPort + ); zooCfg.setProperty(maxClientCnxns, 100); zooCfg.setProperty(dataDir, zooKeeperDir.getAbsolutePath());
[2/6] accumulo git commit: ACCUMULO-3340 Restrict ZooKeeper binding in MAC
ACCUMULO-3340 Restrict ZooKeeper binding in MAC Forces ZooKeeper to bind only to 127.0.0.1 in MiniAccumuloCluster, instead of the default, which is to bind to all interfaces. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1835c27c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1835c27c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1835c27c Branch: refs/heads/1.6 Commit: 1835c27ca41426ddd570cde14f9612c45680b917 Parents: a8a6b15 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 17 13:40:00 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 17 13:40:00 2014 -0500 -- .../java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1835c27c/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java index f839f39..53f51f7 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java @@ -296,6 +296,7 @@ public class MiniAccumuloCluster { zooCfg.setProperty(tickTime, 1000); zooCfg.setProperty(initLimit, 10); zooCfg.setProperty(syncLimit, 5); +zooCfg.setProperty(clientPortAddress, 127.0.0.1); zooCfg.setProperty(clientPort, zooKeeperPort + ); zooCfg.setProperty(maxClientCnxns, 100); zooCfg.setProperty(dataDir, zooKeeperDir.getAbsolutePath());
[6/6] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/60e0b407 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/60e0b407 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/60e0b407 Branch: refs/heads/master Commit: 60e0b40768c9517f1660834ad64bd3d4e061251c Parents: 0412f7b 091f70c Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 17 13:47:31 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 17 13:47:31 2014 -0500 -- .../apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/60e0b407/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java --
[4/6] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/091f70cd Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/091f70cd Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/091f70cd Branch: refs/heads/master Commit: 091f70cd5365942aee63c5040f826fffe246f93e Parents: b68bdae 1835c27 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Nov 17 13:45:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Nov 17 13:45:13 2014 -0500 -- .../apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/091f70cd/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index d45ef0f,000..7283c19 mode 100644,00..100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java @@@ -1,873 -1,0 +1,874 @@@ +/* + * 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.minicluster.impl; + +import static com.google.common.base.Charsets.UTF_8; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileFilter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import org.apache.accumulo.cluster.AccumuloCluster; +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.ClientConfiguration; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.ConfigurationCopy; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterGoalState; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.StringUtil; +import org.apache.accumulo.core.util.UtilWaitThread; +import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; +import org.apache.accumulo.gc.SimpleGarbageCollector; +import org.apache.accumulo.master.Master; +import
accumulo git commit: ACCUMULO-3342 Remove check for tracer in ZK
Repository: accumulo Updated Branches: refs/heads/master a711ae97f - 4af9f85d4 ACCUMULO-3342 Remove check for tracer in ZK Removes the MiniAccumuloCluster check to see if an existing instance is running via the existance of a tracer registration. Tracers aren't really part of Accumulo, so much as an extra service, which also registers itself in ZK. As such, they don't really determine whether Accumulo is running, and in any case, it is not running by default in MiniAccumuloCluster for the tests that are failing, so it's expected that this directory will not exist. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4af9f85d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4af9f85d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4af9f85d Branch: refs/heads/master Commit: 4af9f85d4fc89929870959aac430f3a02c20f20b Parents: a711ae9 Author: Christopher Tubbs ctubb...@apache.org Authored: Tue Nov 18 17:29:14 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Tue Nov 18 17:29:14 2014 -0500 -- .../main/java/org/apache/accumulo/server/util/AccumuloStatus.java | 3 --- .../test/java/org/apache/accumulo/test/functional/BulkFileIT.java | 1 - 2 files changed, 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4af9f85d/server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java b/server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java index 7bd5f6d..1e75124 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/AccumuloStatus.java @@ -50,9 +50,6 @@ public class AccumuloStatus { if (!reader.getChildren(rootPath + Constants.ZTSERVERS + / + child).isEmpty()) return false; } - // TODO: check configured tracers location instead of default - if (!reader.getChildren(Constants.ZTRACERS).isEmpty()) -return false; if (!reader.getChildren(rootPath + Constants.ZMASTER_LOCK).isEmpty()) return false; if (!reader.getChildren(rootPath + Constants.ZMONITOR_LOCK).isEmpty()) http://git-wip-us.apache.org/repos/asf/accumulo/blob/4af9f85d/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java index 27a5801..22aa0cd 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java @@ -37,7 +37,6 @@ import org.apache.accumulo.core.volume.VolumeConfiguration; import org.apache.accumulo.minicluster.MemoryUnit; import org.apache.accumulo.minicluster.ServerType; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; -import org.apache.accumulo.server.conf.ServerConfiguration; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
accumulo git commit: ACCUMULO-2916 Update docs related to ZooKeeper version
Repository: accumulo Updated Branches: refs/heads/master 4af9f85d4 - c51d424b9 ACCUMULO-2916 Update docs related to ZooKeeper version Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c51d424b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c51d424b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c51d424b Branch: refs/heads/master Commit: c51d424b930b13e4bcc39bed1d0b687b769fc1c6 Parents: 4af9f85 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Nov 19 14:03:23 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Nov 19 14:03:23 2014 -0500 -- assemble/bin/start-all.sh | 4 ++-- docs/src/main/asciidoc/chapters/clients.txt | 2 +- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c51d424b/assemble/bin/start-all.sh -- diff --git a/assemble/bin/start-all.sh b/assemble/bin/start-all.sh index cebbd8c..b69bc0e 100755 --- a/assemble/bin/start-all.sh +++ b/assemble/bin/start-all.sh @@ -53,8 +53,8 @@ fi ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION##$ZOOKEEPER_HOME/zookeeper-} ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION%%.jar} -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 http://git-wip-us.apache.org/repos/asf/accumulo/blob/c51d424b/docs/src/main/asciidoc/chapters/clients.txt -- diff --git a/docs/src/main/asciidoc/chapters/clients.txt b/docs/src/main/asciidoc/chapters/clients.txt index a0c74a5..64f0e55 100644 --- a/docs/src/main/asciidoc/chapters/clients.txt +++ b/docs/src/main/asciidoc/chapters/clients.txt @@ -28,7 +28,7 @@ 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 Zookeeper 3.3 you only need to add the Zookeeper jar, and not +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. http://git-wip-us.apache.org/repos/asf/accumulo/blob/c51d424b/pom.xml -- diff --git a/pom.xml b/pom.xml index e9338f4..9e62389 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ slf4j.version1.7.5/slf4j.version !-- Thrift version -- thrift.version0.9.1/thrift.version -!-- ZooKeeper 3.4.x works also, but we're not using new features yet; this ensures 3.3.x compatibility. -- +!-- ZooKeeper version -- zookeeper.version3.4.6/zookeeper.version /properties dependencyManagement
accumulo git commit: ACCUMULO-3351 Remove use of deprecated trace code in 1.7.x
Repository: accumulo Updated Branches: refs/heads/master 89d049971 - 6166406f9 ACCUMULO-3351 Remove use of deprecated trace code in 1.7.x Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6166406f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6166406f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6166406f Branch: refs/heads/master Commit: 6166406f99430e509f1b66d8fc8e8f6a783b8f58 Parents: 89d0499 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 21 15:52:09 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 21 15:52:09 2014 -0500 -- .../accumulo/test/TracerRecoversAfterOfflineTableIT.java | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/6166406f/test/src/test/java/org/apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java b/test/src/test/java/org/apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java index e32ec16..96b4a14 100644 --- a/test/src/test/java/org/apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java +++ b/test/src/test/java/org/apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java @@ -25,13 +25,12 @@ import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.Range; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.trace.DistributedTrace; +import org.apache.accumulo.core.trace.Span; +import org.apache.accumulo.core.trace.Trace; import org.apache.accumulo.core.util.UtilWaitThread; -import org.apache.accumulo.fate.zookeeper.ZooReader; import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacIT; -import org.apache.accumulo.trace.instrument.Span; -import org.apache.accumulo.trace.instrument.Trace; import org.apache.accumulo.tracer.TraceDump; import org.apache.accumulo.tracer.TraceDump.Printer; import org.apache.accumulo.tracer.TraceServer; @@ -74,7 +73,7 @@ public class TracerRecoversAfterOfflineTableIT extends ConfigurableMacIT { log.info(Start a distributed trace span); -DistributedTrace.enable(conn.getInstance(), new ZooReader(conn.getInstance().getZooKeepers(), 30 * 1000), testTrace, localhost); +DistributedTrace.enable(localhost, testTrace); Span root = Trace.on(traceTest); BatchWriter bw = conn.createBatchWriter(tableName, null); Mutation m = new Mutation(m);
accumulo git commit: ACCUMULO-3299 Ensure tests run properly scoped
Repository: accumulo Updated Branches: refs/heads/master 2ab616a64 - ccc9a6788 ACCUMULO-3299 Ensure tests run properly scoped Ensure some tests which were not running, because of their name are running during the build. Made some MiniAccumuloCluster-based tests ITs, and attempted to prevent tests from writing to /tmp (use target/ instead). Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ccc9a678 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ccc9a678 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ccc9a678 Branch: refs/heads/master Commit: ccc9a6788664b4ddce7ca207f0c24cf28b7b9c8b Parents: 2ab616a Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Nov 21 20:13:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Nov 21 20:13:24 2014 -0500 -- .../accumulo/cluster/AccumuloClustersTest.java | 10 +- .../minicluster/impl/CleanShutdownMacTest.java | 11 +- pom.xml | 12 ++ .../accumulo/server/util/FileUtilTest.java | 66 --- .../accumulo/test/KeyValueEqualityIT.java | 75 .../accumulo/test/KeyValueEqualityTest.java | 75 .../test/functional/MetadataMaxFiles.java | 112 -- .../test/functional/MetadataMaxFilesIT.java | 112 ++ .../test/replication/StatusCombinerMacIT.java | 114 +++ .../test/replication/StatusCombinerMacTest.java | 114 --- 10 files changed, 351 insertions(+), 350 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/ccc9a678/minicluster/src/test/java/org/apache/accumulo/cluster/AccumuloClustersTest.java -- diff --git a/minicluster/src/test/java/org/apache/accumulo/cluster/AccumuloClustersTest.java b/minicluster/src/test/java/org/apache/accumulo/cluster/AccumuloClustersTest.java index e368240..177a60f 100644 --- a/minicluster/src/test/java/org/apache/accumulo/cluster/AccumuloClustersTest.java +++ b/minicluster/src/test/java/org/apache/accumulo/cluster/AccumuloClustersTest.java @@ -23,16 +23,15 @@ import static org.easymock.EasyMock.replay; import java.io.File; import java.io.IOException; -import org.apache.accumulo.cluster.AccumuloClusters; import org.apache.accumulo.minicluster.MiniAccumuloCluster; import org.apache.accumulo.minicluster.MiniAccumuloConfig; import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.commons.io.FileUtils; import org.junit.Assert; +import org.junit.Rule; import org.junit.Test; - -import com.google.common.io.Files; +import org.junit.rules.TemporaryFolder; public class AccumuloClustersTest { @@ -46,9 +45,12 @@ public class AccumuloClustersTest { cfg.build(); } + @Rule + public TemporaryFolder tmpDir = new TemporaryFolder(new File(System.getProperty(user.dir) + /target)); + @Test public void testFactoryReturn() throws IOException { -File dir = Files.createTempDir(); +File dir = tmpDir.newFolder(); try { MiniAccumuloConfig cfg = new MiniAccumuloConfig(dir, foo); Assert.assertEquals(MiniAccumuloCluster.class, AccumuloClusters.createMiniCluster(cfg).getClass()); http://git-wip-us.apache.org/repos/asf/accumulo/blob/ccc9a678/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java -- diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java index 2ac8d6f..2c32948 100644 --- a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java +++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java @@ -23,19 +23,22 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import org.easymock.EasyMock; +import org.junit.Rule; import org.junit.Test; - -import com.google.common.io.Files; +import org.junit.rules.TemporaryFolder; /** - * + * */ public class CleanShutdownMacTest { + @Rule + public TemporaryFolder tmpDir = new TemporaryFolder(new File(System.getProperty(user.dir) + /target)); + @SuppressWarnings(unchecked) @Test public void testExecutorServiceShutdown() throws Exception { -File tmp = Files.createTempDir(); +File tmp = tmpDir.newFolder(); MiniAccumuloClusterImpl cluster = new MiniAccumuloClusterImpl(tmp, foo); ExecutorService mockService = EasyMock.createMock(ExecutorService.class);
[1/2] accumulo git commit: ACCUMULO-3176 Create Table with initial properties
Repository: accumulo Updated Branches: refs/heads/ACCUMULO-3176 [created] b4da8757b ACCUMULO-3176 Create Table with initial properties Signed-off-by: Christopher Tubbs ctubb...@apache.org Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/afd1cb13 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/afd1cb13 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/afd1cb13 Branch: refs/heads/ACCUMULO-3176 Commit: afd1cb13383e104d1f2fdcea25931ec8691d0b45 Parents: bfcb0ed Author: Jenna Huston jenna.husto...@gmail.com Authored: Tue Sep 30 14:17:10 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Tue Nov 25 11:29:08 2014 -0500 -- .../core/client/NewTableConfiguration.java | 78 .../core/client/admin/TableOperations.java | 22 +++ .../core/client/impl/TableOperationsImpl.java | 31 ++- .../accumulo/core/client/mock/MockAccumulo.java | 23 ++- .../accumulo/core/client/mock/MockTable.java| 32 +++- .../core/client/mock/MockTableOperations.java | 29 ++- .../client/impl/TableOperationsHelperTest.java | 6 + .../org/apache/accumulo/proxy/ProxyServer.java | 2 +- .../shell/commands/CreateTableCommand.java | 19 +- .../test/CreateTableWithNewTableConfigIT.java | 191 +++ .../org/apache/accumulo/test/ShellServerIT.java | 29 ++- 11 files changed, 441 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/afd1cb13/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java new file mode 100644 index 000..515919f --- /dev/null +++ b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java @@ -0,0 +1,78 @@ +/* + * 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.client; + +import static com.google.common.base.Preconditions.checkArgument; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.accumulo.core.client.admin.TimeType; +import org.apache.accumulo.core.iterators.IteratorUtil; + +/** + * This object stores table creation parameters. Currently including: TimeType, limitVersion, and user specified initial properties + * + * @since 1.7.0 + */ +public class NewTableConfiguration { + + private static final TimeType DEFAULT_TIME_TYPE = TimeType.MILLIS; + private TimeType timeType = DEFAULT_TIME_TYPE; + + private boolean limitVersion = true; + + private MapString,String properties = new HashMapString,String(); + + public NewTableConfiguration setTimeType(TimeType tt) { +checkArgument(tt != null, TimeType is null); + +this.timeType = tt; +return this; + } + + public TimeType getTimeType() { +return timeType; + } + + /** + * Currently the only default iterator is the versioning iterator. This method will cause the table to be created without the versioning iterator + */ + public NewTableConfiguration withoutDefaultIterators() { +this.limitVersion = false; +return this; + } + + public NewTableConfiguration setProperties(MapString,String prop) { +checkArgument(prop != null, properties is null); + +this.properties = new HashMapString,String(prop); +return this; + } + + public MapString,String getProperties() { +MapString,String propertyMap = new HashMap(); + +if (limitVersion) { + propertyMap.putAll(IteratorUtil.generateInitialTableProperties(limitVersion)); +} + +propertyMap.putAll(properties); +return Collections.unmodifiableMap(propertyMap); + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/afd1cb13/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java -- diff --git
[2/2] accumulo git commit: ACCUMULO-3176 Expand on javadocs and remove deprecated usage
ACCUMULO-3176 Expand on javadocs and remove deprecated usage Also fix a few MockTableOperations bugs Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b4da8757 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b4da8757 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b4da8757 Branch: refs/heads/ACCUMULO-3176 Commit: b4da8757bcd0932a18d38858e45e688a4a1dc577 Parents: afd1cb1 Author: Christopher Tubbs ctubb...@apache.org Authored: Tue Nov 25 12:42:45 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Tue Nov 25 12:42:45 2014 -0500 -- .../core/client/NewTableConfiguration.java | 36 ++-- .../core/client/impl/TableOperationsImpl.java | 4 +-- .../accumulo/core/client/mock/MockAccumulo.java | 3 +- .../core/client/mock/MockTableOperations.java | 4 +-- .../client/mock/MockTableOperationsTest.java| 5 +-- .../minicluster/MiniAccumuloClusterTest.java| 3 +- .../org/apache/accumulo/proxy/ProxyServer.java | 6 +++- .../accumulo/test/ConditionalWriterIT.java | 3 +- .../test/CreateTableWithNewTableConfigIT.java | 11 -- .../org/apache/accumulo/test/NamespacesIT.java | 3 +- .../java/org/apache/accumulo/test/VolumeIT.java | 3 +- .../accumulo/test/functional/LogicalTimeIT.java | 3 +- .../accumulo/test/functional/MergeIT.java | 3 +- .../test/replication/CyclicReplicationIT.java | 5 +-- 14 files changed, 70 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b4da8757/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java index 515919f..afe0ebf 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java @@ -24,10 +24,12 @@ import java.util.Map; import org.apache.accumulo.core.client.admin.TimeType; import org.apache.accumulo.core.iterators.IteratorUtil; +import org.apache.accumulo.core.iterators.user.VersioningIterator; /** - * This object stores table creation parameters. Currently including: TimeType, limitVersion, and user specified initial properties - * + * This object stores table creation parameters. Currently includes: {@link TimeType}, whether to include default iterators, and user-specified initial + * properties + * * @since 1.7.0 */ public class NewTableConfiguration { @@ -39,6 +41,13 @@ public class NewTableConfiguration { private MapString,String properties = new HashMapString,String(); + /** + * Configure logical or millisecond time for tables created with this configuration. + * + * @param tt + * the time type to use; defaults to milliseconds + * @return this + */ public NewTableConfiguration setTimeType(TimeType tt) { checkArgument(tt != null, TimeType is null); @@ -46,18 +55,34 @@ public class NewTableConfiguration { return this; } + /** + * Retrieve the time type currently configured. + * + * @return the time type + */ public TimeType getTimeType() { return timeType; } /** - * Currently the only default iterator is the versioning iterator. This method will cause the table to be created without the versioning iterator + * Currently the only default iterator is the {@link VersioningIterator}. This method will cause the table to be created without that iterator, or any others + * which may become defaults in the future. + * + * @return this */ public NewTableConfiguration withoutDefaultIterators() { this.limitVersion = false; return this; } + /** + * Sets additional properties to be applied to tables created with this configuration. Additional calls to this method replaces properties set by previous + * calls. + * + * @param prop + * additional properties to add to the table when it is created + * @return this + */ public NewTableConfiguration setProperties(MapString,String prop) { checkArgument(prop != null, properties is null); @@ -65,6 +90,11 @@ public class NewTableConfiguration { return this; } + /** + * Retrieves the complete set of currently configured table properties to be applied to a table when this configuration object is used. + * + * @return the current properties configured + */ public MapString,String getProperties() { MapString,String propertyMap = new HashMap();
[06/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java -- diff --git 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 index a15e05e..670c541 100644 --- 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 @@ -80,15 +80,16 @@ import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; import org.apache.accumulo.server.Accumulo; +import org.apache.accumulo.server.AccumuloServerContext; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.conf.ServerConfigurationFactory; import org.apache.accumulo.server.constraints.MetadataConstraints; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.fs.VolumeManagerImpl; import org.apache.accumulo.server.iterators.MetadataBulkLoadFilter; import org.apache.accumulo.server.replication.StatusCombiner; import org.apache.accumulo.server.security.AuditedSecurityOperation; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tables.TableManager; import org.apache.accumulo.server.tablets.TabletTime; import org.apache.accumulo.server.util.ReplicationTableUtil; @@ -546,7 +547,13 @@ public class Initialize { } private static void initSecurity(Opts opts, String iid) throws AccumuloSecurityException, ThriftSecurityException { -AuditedSecurityOperation.getInstance(iid, true).initializeSecurity(SystemCredentials.get().toThrift(HdfsZooInstance.getInstance()), DEFAULT_ROOT_USER, +AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance()) { + @Override + public synchronized AccumuloConfiguration getConfiguration() { +return getSiteConfiguration(); + } +}); +AuditedSecurityOperation.getInstance(context, true).initializeSecurity(context.rpcCreds(), DEFAULT_ROOT_USER, opts.rootpass); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java index 3388b5b..d392bde 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java +++ b/server/base/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java @@ -27,9 +27,8 @@ import java.util.Map.Entry; import java.util.Set; import org.apache.accumulo.core.Constants; -import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; -import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.data.KeyExtent; import org.apache.accumulo.core.master.thrift.TabletServerStatus; import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException; @@ -40,7 +39,6 @@ import org.apache.accumulo.core.util.ServerServices; import org.apache.accumulo.core.util.ThriftUtil; import org.apache.accumulo.core.zookeeper.ZooUtil; import org.apache.accumulo.server.master.state.TServerInstance; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.util.Halt; import org.apache.accumulo.server.util.time.SimpleTimer; import org.apache.accumulo.server.zookeeper.ZooCache; @@ -68,8 +66,7 @@ public class LiveTServerSet implements Watcher { private static final Logger log = Logger.getLogger(LiveTServerSet.class); private final Listener cback; - private final Instance instance; - private final AccumuloConfiguration conf; + private final ClientContext context; private ZooCache zooCache; public class TServerConnection { @@ -80,22 +77,22 @@ public class LiveTServerSet implements Watcher { } private String lockString(ZooLock mlock) { - return mlock.getLockID().serialize(ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK); + return mlock.getLockID().serialize(ZooUtil.getRoot(context.getInstance()) + Constants.ZMASTER_LOCK); } public void assignTablet(ZooLock lock, KeyExtent extent) throws TException { - TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, conf); + TabletClientService.Client
[03/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java index e2ac08b..b8e0b40 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java +++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java @@ -39,7 +39,7 @@ import org.apache.accumulo.core.replication.StatusUtil; import org.apache.accumulo.core.replication.proto.Replication.Status; import org.apache.accumulo.core.trace.Span; import org.apache.accumulo.core.trace.Trace; -import org.apache.accumulo.server.conf.ServerConfigurationFactory; +import org.apache.accumulo.server.AccumuloServerContext; import org.apache.accumulo.server.conf.TableConfiguration; import org.apache.hadoop.io.DataOutputBuffer; import org.apache.hadoop.io.Text; @@ -54,16 +54,17 @@ import com.google.protobuf.InvalidProtocolBufferException; public class WorkMaker { private static final Logger log = LoggerFactory.getLogger(WorkMaker.class); - private final Connector conn; + private final AccumuloServerContext context; + private Connector conn; private BatchWriter writer; - public WorkMaker(Connector conn) { + public WorkMaker(AccumuloServerContext context, Connector conn) { +this.context = context; this.conn = conn; } public void run() { -ServerConfigurationFactory serverConf = new ServerConfigurationFactory(conn.getInstance()); if (!ReplicationTable.isOnline(conn)) { log.info(Replication table is not yet online); return; @@ -110,7 +111,7 @@ public class WorkMaker { } // Get the table configuration for the table specified by the status record -tableConf = serverConf.getTableConfiguration(tableId.toString()); +tableConf = context.getServerConfigurationFactory().getTableConfiguration(tableId.toString()); // Pull the relevant replication targets // TODO Cache this instead of pulling it every time http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java index 66c3fcc..8ce728e 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java @@ -40,7 +40,6 @@ import java.util.concurrent.TimeUnit; import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.IsolatedScanner; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.impl.ServerClient; @@ -60,20 +59,18 @@ import org.apache.accumulo.core.master.state.tables.TableState; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.trace.wrappers.TraceExecutorService; import org.apache.accumulo.core.trace.Tracer; +import org.apache.accumulo.core.trace.wrappers.TraceExecutorService; import org.apache.accumulo.core.util.Pair; import org.apache.accumulo.core.util.SimpleThreadPool; import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.fate.Repo; import org.apache.accumulo.master.Master; import org.apache.accumulo.server.ServerConstants; -import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.fs.FileRef; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection; import org.apache.accumulo.server.master.state.TServerInstance; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tablets.UniqueNameAllocator; import org.apache.accumulo.server.util.MetadataTableUtil; import org.apache.accumulo.server.zookeeper.DistributedWorkQueue; @@ -131,9 +128,8 @@ public class BulkImport extends MasterRepo { if (!Utils.getReadLock(tableId, tid).tryLock()) return 100; -Instance instance = HdfsZooInstance.getInstance(); -Tables.clearCache(instance); -if (Tables.getTableState(instance, tableId) == TableState.ONLINE) { +Tables.clearCache(master.getInstance()); +if (Tables.getTableState(master.getInstance(), tableId) == TableState.ONLINE) { long
[08/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java index 0cb9f7f..cd3dfd0 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java @@ -43,8 +43,6 @@ import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.client.TableOfflineException; import org.apache.accumulo.core.client.TimedOutException; import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; -import org.apache.accumulo.core.conf.AccumuloConfiguration; -import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.data.Column; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.KeyExtent; @@ -57,11 +55,10 @@ import org.apache.accumulo.core.data.thrift.TKeyValue; import org.apache.accumulo.core.data.thrift.TRange; import org.apache.accumulo.core.master.state.tables.TableState; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException; import org.apache.accumulo.core.tabletserver.thrift.TabletClientService; -import org.apache.accumulo.core.trace.wrappers.TraceRunnable; import org.apache.accumulo.core.trace.Tracer; +import org.apache.accumulo.core.trace.wrappers.TraceRunnable; import org.apache.accumulo.core.util.ByteBufferUtil; import org.apache.accumulo.core.util.OpTimer; import org.apache.accumulo.core.util.ThriftUtil; @@ -77,8 +74,8 @@ public class TabletServerBatchReaderIterator implements IteratorEntryKey,Value private static final Logger log = Logger.getLogger(TabletServerBatchReaderIterator.class); + private final ClientContext context; private final Instance instance; - private final Credentials credentials; private final String table; private Authorizations authorizations = Authorizations.EMPTY; private final int numThreads; @@ -105,11 +102,11 @@ public class TabletServerBatchReaderIterator implements IteratorEntryKey,Value void receive(ListEntryKey,Value entries); } - public TabletServerBatchReaderIterator(Instance instance, Credentials credentials, String table, Authorizations authorizations, ArrayListRange ranges, - int numThreads, ExecutorService queryThreadPool, ScannerOptions scannerOptions, long timeout) { + public TabletServerBatchReaderIterator(ClientContext context, String table, Authorizations authorizations, ArrayListRange ranges, int numThreads, + ExecutorService queryThreadPool, ScannerOptions scannerOptions, long timeout) { -this.instance = instance; -this.credentials = credentials; +this.context = context; +this.instance = context.getInstance(); this.table = table; this.authorizations = authorizations; this.numThreads = numThreads; @@ -117,7 +114,7 @@ public class TabletServerBatchReaderIterator implements IteratorEntryKey,Value this.options = new ScannerOptions(scannerOptions); resultsQueue = new ArrayBlockingQueueListEntryKey,Value(numThreads); -this.locator = new TimeoutTabletLocator(TabletLocator.getLocator(instance, new Text(table)), timeout); +this.locator = new TimeoutTabletLocator(TabletLocator.getLocator(context, new Text(table)), timeout); timeoutTrackers = Collections.synchronizedMap(new HashMapString,TabletServerBatchReaderIterator.TimeoutTracker()); timedoutServers = Collections.synchronizedSet(new HashSetString()); @@ -227,7 +224,7 @@ public class TabletServerBatchReaderIterator implements IteratorEntryKey,Value while (true) { binnedRanges.clear(); - ListRange failures = tabletLocator.binRanges(credentials, ranges, binnedRanges); + ListRange failures = tabletLocator.binRanges(context, ranges, binnedRanges); if (failures.size() 0) { // tried to only do table state checks when failures.size() == ranges.size(), however this did @@ -343,8 +340,7 @@ public class TabletServerBatchReaderIterator implements IteratorEntryKey,Value timeoutTracker = new TimeoutTracker(tsLocation, timedoutServers, timeout); timeoutTrackers.put(tsLocation, timeoutTracker); } -doLookup(instance, credentials, tsLocation, tabletsRanges, tsFailures, unscanned, receiver, columns, options, authorizations, -ClientConfigurationHelper.getClientRpcConfiguration(instance), timeoutTracker); +doLookup(context, tsLocation, tabletsRanges,
[05/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java index 01eb477..88316c6 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/MasterMetadataUtil.java @@ -30,6 +30,7 @@ import java.util.TreeMap; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.Scanner; +import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.client.impl.ScannerImpl; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.KeyExtent; @@ -44,12 +45,10 @@ import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Da import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ScanFileColumnFamily; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.util.ColumnFQ; import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.fate.zookeeper.IZooReaderWriter; import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; -import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.fs.FileRef; import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.fs.VolumeManagerImpl; @@ -67,8 +66,8 @@ public class MasterMetadataUtil { private static final Logger log = Logger.getLogger(MasterMetadataUtil.class); - public static void addNewTablet(KeyExtent extent, String path, TServerInstance location, MapFileRef,DataFileValue datafileSizes, - MapFileRef,Long bulkLoadedFiles, Credentials credentials, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) { + public static void addNewTablet(ClientContext context, KeyExtent extent, String path, TServerInstance location, + MapFileRef,DataFileValue datafileSizes, MapFileRef,Long bulkLoadedFiles, String time, long lastFlushID, long lastCompactID, ZooLock zooLock) { Mutation m = extent.getPrevRowUpdateMutation(); TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN.put(m, new Value(path.getBytes(UTF_8))); @@ -92,10 +91,10 @@ public class MasterMetadataUtil { m.put(TabletsSection.BulkFileColumnFamily.NAME, entry.getKey().meta(), new Value(tidBytes)); } -MetadataTableUtil.update(credentials, zooLock, m, extent); +MetadataTableUtil.update(context, zooLock, m, extent); } - public static KeyExtent fixSplit(Text metadataEntry, SortedMapColumnFQ,Value columns, TServerInstance tserver, Credentials credentials, ZooLock lock) + public static KeyExtent fixSplit(ClientContext context, Text metadataEntry, SortedMapColumnFQ,Value columns, TServerInstance tserver, ZooLock lock) throws AccumuloException, IOException { log.info(Incomplete split + metadataEntry + attempting to fix); @@ -133,11 +132,11 @@ public class MasterMetadataUtil { Text table = (new KeyExtent(metadataEntry, (Text) null)).getTableId(); -return fixSplit(table, metadataEntry, metadataPrevEndRow, oper, splitRatio, tserver, credentials, time.toString(), initFlushID, initCompactID, lock); +return fixSplit(context, table, metadataEntry, metadataPrevEndRow, oper, splitRatio, tserver, time.toString(), initFlushID, initCompactID, lock); } - private static KeyExtent fixSplit(Text table, Text metadataEntry, Text metadataPrevEndRow, Value oper, double splitRatio, TServerInstance tserver, - Credentials credentials, String time, long initFlushID, long initCompactID, ZooLock lock) throws AccumuloException, IOException { + private static KeyExtent fixSplit(ClientContext context, Text table, Text metadataEntry, Text metadataPrevEndRow, Value oper, double splitRatio, + TServerInstance tserver, String time, long initFlushID, long initCompactID, ZooLock lock) throws AccumuloException, IOException { if (metadataPrevEndRow == null) // something is wrong, this should not happen... if a tablet is split, it will always have a // prev end row @@ -146,20 +145,20 @@ public class MasterMetadataUtil { // check to see if prev tablet exist in metadata tablet Key prevRowKey = new Key(new Text(KeyExtent.getMetadataEntry(table, metadataPrevEndRow))); -ScannerImpl scanner2 = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, MetadataTable.ID, Authorizations.EMPTY); +ScannerImpl scanner2 = new
[02/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java -- diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java index 4409dff..ecb4ff7 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java @@ -26,6 +26,7 @@ import java.util.Map.Entry; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.data.KeyExtent; import org.apache.accumulo.core.master.thrift.DeadServer; import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; @@ -50,7 +51,6 @@ import org.apache.accumulo.monitor.util.celltypes.ProgressChartType; import org.apache.accumulo.monitor.util.celltypes.TServerLinkType; import org.apache.accumulo.monitor.util.celltypes.TableLinkType; import org.apache.accumulo.server.master.state.TabletServerState; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.util.ActionStatsUpdator; import org.apache.accumulo.server.util.TableInfoUtil; @@ -124,12 +124,13 @@ public class TServersServlet extends BasicServlet { TabletStats historical = new TabletStats(null, new ActionStats(), new ActionStats(), new ActionStats(), 0, 0, 0, 0); ListTabletStats tsStats = new ArrayListTabletStats(); try { - TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, Monitor.getSystemConfiguration()); + ClientContext context = Monitor.getContext(); + TabletClientService.Client client = ThriftUtil.getClient(new TabletClientService.Client.Factory(), address, context); try { for (String tableId : Monitor.getMmi().tableMap.keySet()) { - tsStats.addAll(client.getTabletStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(Monitor.getInstance()), tableId)); + tsStats.addAll(client.getTabletStats(Tracer.traceInfo(), context.rpcCreds(), tableId)); } -historical = client.getHistoricalStats(Tracer.traceInfo(), SystemCredentials.get().toThrift(Monitor.getInstance())); +historical = client.getHistoricalStats(Tracer.traceInfo(), context.rpcCreds()); } finally { ThriftUtil.returnClient(client); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java -- diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java index 428880e..e5914f9 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TablesServlet.java @@ -43,10 +43,8 @@ import org.apache.accumulo.monitor.util.celltypes.DurationType; import org.apache.accumulo.monitor.util.celltypes.NumberType; import org.apache.accumulo.monitor.util.celltypes.TableLinkType; import org.apache.accumulo.monitor.util.celltypes.TableStateType; -import org.apache.accumulo.server.client.HdfsZooInstance; import org.apache.accumulo.server.master.state.MetaDataTableScanner; import org.apache.accumulo.server.master.state.TabletLocationState; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tables.TableManager; import org.apache.accumulo.server.util.TableInfoUtil; import org.apache.hadoop.io.Text; @@ -62,7 +60,7 @@ public class TablesServlet extends BasicServlet { @Override protected void pageBody(HttpServletRequest req, HttpServletResponse response, StringBuilder sb) throws Exception { -MapString,String tidToNameMap = Tables.getIdToNameMap(HdfsZooInstance.getInstance()); +MapString,String tidToNameMap = Tables.getIdToNameMap(Monitor.getContext().getInstance()); String tableId = req.getParameter(t); doProblemsBanner(sb); @@ -117,7 +115,7 @@ public class TablesServlet extends BasicServlet { MapString,Double compactingByTable = TableInfoUtil.summarizeTableStats(Monitor.getMmi()); TableManager tableManager = TableManager.getInstance(); -for (EntryString,String tableName_tableId : Tables.getNameToIdMap(HdfsZooInstance.getInstance()).entrySet()) { +for (EntryString,String tableName_tableId : Tables.getNameToIdMap(Monitor.getContext().getInstance()).entrySet()) { String tableName = tableName_tableId.getKey();
[01/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
Repository: accumulo Updated Branches: refs/heads/master bfcb0edb6 - 42c25faa7 http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/tserver/src/test/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManagerTest.java -- diff --git a/server/tserver/src/test/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManagerTest.java b/server/tserver/src/test/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManagerTest.java index 26ec264..2a85825 100644 --- a/server/tserver/src/test/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManagerTest.java +++ b/server/tserver/src/test/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManagerTest.java @@ -26,7 +26,10 @@ import org.apache.accumulo.core.client.mock.MockInstance; import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.DefaultConfiguration; import org.apache.accumulo.core.data.KeyExtent; +import org.apache.accumulo.server.conf.NamespaceConfiguration; +import org.apache.accumulo.server.conf.ServerConfiguration; import org.apache.accumulo.server.conf.ServerConfigurationFactory; +import org.apache.accumulo.server.conf.TableConfiguration; import org.apache.hadoop.io.Text; import org.junit.Test; @@ -42,12 +45,33 @@ public class LargestFirstMemoryManagerTest { @Test public void test() throws Exception { LargestFirstMemoryManagerUnderTest mgr = new LargestFirstMemoryManagerUnderTest(); -Instance instance = new MockInstance(); -ServerConfigurationFactory config = new ServerConfigurationFactory(instance) { +ServerConfiguration config = new ServerConfiguration() { + ServerConfigurationFactory delegate = new ServerConfigurationFactory(new MockInstance()); + @Override public AccumuloConfiguration getConfiguration() { return DefaultConfiguration.getInstance(); } + + @Override + public TableConfiguration getTableConfiguration(String tableId) { +return delegate.getTableConfiguration(tableId); + } + + @Override + public TableConfiguration getTableConfiguration(KeyExtent extent) { +return delegate.getTableConfiguration(extent); + } + + @Override + public NamespaceConfiguration getNamespaceConfiguration(String namespaceId) { +return delegate.getNamespaceConfiguration(namespaceId); + } + + @Override + public Instance getInstance() { +return delegate.getInstance(); + } }; mgr.init(config); MemoryManagementActions result; http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java -- diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java index fee5dcd..aba0b1c 100644 --- a/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java +++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/replication/BatchWriterReplicationReplayerTest.java @@ -26,9 +26,12 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.nio.ByteBuffer; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.data.Mutation; @@ -37,6 +40,8 @@ import org.apache.accumulo.core.replication.thrift.WalEdits; import org.apache.accumulo.server.data.ServerMutation; import org.apache.accumulo.tserver.logger.LogEvents; import org.apache.accumulo.tserver.logger.LogFileKey; +import org.junit.After; +import org.junit.Before; import org.junit.Test; import com.google.common.collect.Lists; @@ -46,6 +51,27 @@ import com.google.common.collect.Lists; */ public class BatchWriterReplicationReplayerTest { + private ClientContext context; + private Connector conn; + private AccumuloConfiguration conf; + private BatchWriter bw; + + @Before + public void setUpContext() throws AccumuloException, AccumuloSecurityException { +conn = createMock(Connector.class); +conf = createMock(AccumuloConfiguration.class); +bw = createMock(BatchWriter.class); +context = createMock(ClientContext.class); +expect(context.getConfiguration()).andReturn(conf).anyTimes(); +
[04/10] accumulo git commit: ACCUMULO-3199 Internal refactor to add ClientContext
http://git-wip-us.apache.org/repos/asf/accumulo/blob/42c25faa/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -- diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java index f6ea8f7..1c1caa2 100644 --- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java +++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java @@ -36,13 +36,11 @@ import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; import org.apache.accumulo.core.client.BatchWriterConfig; import org.apache.accumulo.core.client.Connector; -import org.apache.accumulo.core.client.Instance; import org.apache.accumulo.core.client.IsolatedScanner; import org.apache.accumulo.core.client.MutationsRejectedException; import org.apache.accumulo.core.client.Scanner; import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.client.impl.Tables; -import org.apache.accumulo.core.conf.AccumuloConfiguration; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.conf.SiteConfiguration; import org.apache.accumulo.core.data.Key; @@ -66,7 +64,6 @@ import org.apache.accumulo.core.replication.ReplicationTable; import org.apache.accumulo.core.replication.ReplicationTableOfflineException; import org.apache.accumulo.core.replication.proto.Replication.Status; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.core.security.Credentials; import org.apache.accumulo.core.security.SecurityUtil; import org.apache.accumulo.core.security.thrift.TCredentials; import org.apache.accumulo.core.trace.CountSampler; @@ -78,7 +75,6 @@ import org.apache.accumulo.core.util.NamingThreadFactory; import org.apache.accumulo.core.util.Pair; import org.apache.accumulo.core.util.ServerServices; import org.apache.accumulo.core.util.ServerServices.Service; -import org.apache.accumulo.core.util.SslConnectionParams; import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.core.volume.Volume; import org.apache.accumulo.core.zookeeper.ZooUtil; @@ -86,6 +82,7 @@ import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason; import org.apache.accumulo.fate.zookeeper.ZooLock.LockWatcher; import org.apache.accumulo.gc.replication.CloseWriteAheadLogReferences; import org.apache.accumulo.server.Accumulo; +import org.apache.accumulo.server.AccumuloServerContext; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.ServerOpts; import org.apache.accumulo.server.client.HdfsZooInstance; @@ -94,7 +91,6 @@ import org.apache.accumulo.server.fs.VolumeManager; import org.apache.accumulo.server.fs.VolumeManager.FileType; import org.apache.accumulo.server.fs.VolumeManagerImpl; import org.apache.accumulo.server.fs.VolumeUtil; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tables.TableManager; import org.apache.accumulo.server.util.Halt; import org.apache.accumulo.server.util.RpcWrapper; @@ -114,7 +110,7 @@ import com.google.common.collect.Maps; import com.google.common.net.HostAndPort; import com.google.protobuf.InvalidProtocolBufferException; -public class SimpleGarbageCollector implements Iface { +public class SimpleGarbageCollector extends AccumuloServerContext implements Iface { private static final Text EMPTY_TEXT = new Text(); /** @@ -134,31 +130,24 @@ public class SimpleGarbageCollector implements Iface { private static final Logger log = Logger.getLogger(SimpleGarbageCollector.class); - private Credentials credentials; private VolumeManager fs; - private AccumuloConfiguration config; private Opts opts = new Opts(); private ZooLock lock; private GCStatus status = new GCStatus(new GcCycleStats(), new GcCycleStats(), new GcCycleStats(), new GcCycleStats()); - private Instance instance; - public static void main(String[] args) throws UnknownHostException, IOException { SecurityUtil.serverLogin(SiteConfiguration.getInstance()); final String app = gc; Accumulo.setupLogging(app); -Instance instance = HdfsZooInstance.getInstance(); -ServerConfigurationFactory conf = new ServerConfigurationFactory(instance); +ServerConfigurationFactory conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance()); final VolumeManager fs = VolumeManagerImpl.get(); Accumulo.init(fs, conf, app); Opts opts = new Opts(); opts.parseArgs(app, args); -SimpleGarbageCollector gc = new SimpleGarbageCollector(opts); -AccumuloConfiguration config = conf.getConfiguration(); +SimpleGarbageCollector gc = new SimpleGarbageCollector(opts, fs, conf); -gc.init(fs, instance, SystemCredentials.get(),
[2/3] accumulo git commit: ACCUMULO-3167 Fix javadoc typo/tag usage
ACCUMULO-3167 Fix javadoc typo/tag usage Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3bb20cd1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3bb20cd1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3bb20cd1 Branch: refs/heads/master Commit: 3bb20cd1f1a7027967abdc95e87d8b7a044c9d81 Parents: eed1656 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 1 19:34:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 1 19:34:24 2014 -0500 -- .../main/java/org/apache/accumulo/cluster/AccumuloCluster.java | 4 .../java/org/apache/accumulo/cluster/RemoteShellOptions.java | 2 +- .../test/java/org/apache/accumulo/harness/AccumuloClusterIT.java | 2 -- .../java/org/apache/accumulo/harness/MiniClusterHarness.java | 4 4 files changed, 1 insertion(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java index e823f15..a3dbb09 100644 --- a/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java @@ -64,15 +64,11 @@ public interface AccumuloCluster { /** * Start the AccumuloCluster - * - * @throws Exception */ void start() throws Exception; /** * Stop the AccumuloCluster - * - * @throws Exception */ void stop() throws Exception; http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java index eb3b9ed..714096e 100644 --- a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java +++ b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; /** * Property-based configuration of options to control how SSH is performed. * - * A properties file can be provided using {@link #SSH_PROPETIES_FILE} or using the normal system properties. Any relevant properties set in the system + * A properties file can be provided using {@link #SSH_PROPERTIES_FILE} or using the normal system properties. Any relevant properties set in the system * properties take precedence over the provided file. */ public class RemoteShellOptions { http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java index 6c496e9..d9d52d6 100644 --- a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java @@ -201,8 +201,6 @@ public abstract class AccumuloClusterIT extends AccumuloIT implements MiniCluste * already exist. * * @return A directory which can be expected to exist on the Cluster's FileSystem - * @throws IOException - * @throws IllegalArgumentException */ public String getUsableDir() throws IllegalArgumentException, IOException { if (ClusterType.MINI == getClusterType()) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java b/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java index 61e7161..abdb627 100644 --- a/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java +++ b/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java @@ -47,10 +47,6 @@ public class MiniClusterHarness { /** * Create a MiniAccumuloCluster using the given Token as the credentials for the root user. - * - * @param token - * @return - * @throws Exception */ public MiniAccumuloClusterImpl create(AuthenticationToken token) throws Exception { return create(MiniClusterHarness.class.getName(), Long.toString(COUNTER.incrementAndGet()), token);
[1/3] accumulo git commit: ACCUMULO-3167 Fix javadoc typo/tag usage
Repository: accumulo Updated Branches: refs/heads/1.6 eed1656f8 - 3bb20cd1f refs/heads/master 692312b57 - 54475e5c1 ACCUMULO-3167 Fix javadoc typo/tag usage Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3bb20cd1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3bb20cd1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3bb20cd1 Branch: refs/heads/1.6 Commit: 3bb20cd1f1a7027967abdc95e87d8b7a044c9d81 Parents: eed1656 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 1 19:34:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 1 19:34:24 2014 -0500 -- .../main/java/org/apache/accumulo/cluster/AccumuloCluster.java | 4 .../java/org/apache/accumulo/cluster/RemoteShellOptions.java | 2 +- .../test/java/org/apache/accumulo/harness/AccumuloClusterIT.java | 2 -- .../java/org/apache/accumulo/harness/MiniClusterHarness.java | 4 4 files changed, 1 insertion(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java index e823f15..a3dbb09 100644 --- a/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/cluster/AccumuloCluster.java @@ -64,15 +64,11 @@ public interface AccumuloCluster { /** * Start the AccumuloCluster - * - * @throws Exception */ void start() throws Exception; /** * Stop the AccumuloCluster - * - * @throws Exception */ void stop() throws Exception; http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java index eb3b9ed..714096e 100644 --- a/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java +++ b/minicluster/src/main/java/org/apache/accumulo/cluster/RemoteShellOptions.java @@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory; /** * Property-based configuration of options to control how SSH is performed. * - * A properties file can be provided using {@link #SSH_PROPETIES_FILE} or using the normal system properties. Any relevant properties set in the system + * A properties file can be provided using {@link #SSH_PROPERTIES_FILE} or using the normal system properties. Any relevant properties set in the system * properties take precedence over the provided file. */ public class RemoteShellOptions { http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java index 6c496e9..d9d52d6 100644 --- a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java @@ -201,8 +201,6 @@ public abstract class AccumuloClusterIT extends AccumuloIT implements MiniCluste * already exist. * * @return A directory which can be expected to exist on the Cluster's FileSystem - * @throws IOException - * @throws IllegalArgumentException */ public String getUsableDir() throws IllegalArgumentException, IOException { if (ClusterType.MINI == getClusterType()) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bb20cd1/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java b/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java index 61e7161..abdb627 100644 --- a/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java +++ b/test/src/test/java/org/apache/accumulo/harness/MiniClusterHarness.java @@ -47,10 +47,6 @@ public class MiniClusterHarness { /** * Create a MiniAccumuloCluster using the given Token as the credentials for the root user. - * - * @param token - * @return - * @throws Exception */ public MiniAccumuloClusterImpl create(AuthenticationToken token) throws Exception { return
[3/3] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/54475e5c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/54475e5c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/54475e5c Branch: refs/heads/master Commit: 54475e5c15434eabfcbe130fdad157536642f21f Parents: 692312b 3bb20cd Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 1 19:34:48 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 1 19:34:48 2014 -0500 -- .../main/java/org/apache/accumulo/cluster/AccumuloCluster.java | 4 .../java/org/apache/accumulo/cluster/RemoteShellOptions.java | 2 +- .../test/java/org/apache/accumulo/harness/AccumuloClusterIT.java | 2 -- .../java/org/apache/accumulo/harness/MiniClusterHarness.java | 4 4 files changed, 1 insertion(+), 11 deletions(-) --
accumulo git commit: ACCUMULO-3123 Document custom per-table properties
Repository: accumulo Updated Branches: refs/heads/master 4fb52f925 - 433b6df06 ACCUMULO-3123 Document custom per-table properties Signed-off-by: Christopher Tubbs ctubb...@apache.org Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/433b6df0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/433b6df0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/433b6df0 Branch: refs/heads/master Commit: 433b6df0622809220f001e8d8b4f26c41d032250 Parents: 4fb52f9 Author: Jenna Huston jenna.husto...@gmail.com Authored: Wed Nov 19 13:31:34 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 4 17:56:44 2014 -0500 -- docs/src/main/asciidoc/chapters/administration.txt | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/433b6df0/docs/src/main/asciidoc/chapters/administration.txt -- diff --git a/docs/src/main/asciidoc/chapters/administration.txt b/docs/src/main/asciidoc/chapters/administration.txt index e9e0126..0e00d02 100644 --- a/docs/src/main/asciidoc/chapters/administration.txt +++ b/docs/src/main/asciidoc/chapters/administration.txt @@ -238,6 +238,13 @@ A KeyStore can also be stored in HDFS, which will make the KeyStore readily avai all Accumulo servers. If the local filesystem is used, be aware that each Accumulo server will expect the KeyStore in the same location. + Custom Table Tags + +Accumulo has the ability for users to add custom tags to tables. This allows +applications to set application-level metadata about a table. These tags can be +anything from a table description, administrator notes, date created, etc. +This is done by naming and setting a property with a prefix +table.custom.*+. + === Initialization Accumulo must be initialized to create the structures it uses internally to locate
[3/4] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Conflicts: core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e67296bb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e67296bb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e67296bb Branch: refs/heads/master Commit: e67296bb1fbe806c9b35827df30827ff4bf39c2c Parents: 2f788f4 a3267d3 Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Dec 5 17:20:47 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 17:20:47 2014 -0500 -- .../accumulo/core/client/lexicoder/DateLexicoder.java| 11 ++- .../core/client/lexicoder/ReverseLexicoderTest.java | 6 +- 2 files changed, 11 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e67296bb/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java -- diff --cc core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java index 6e594be,3077645..bde8a3f --- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java +++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java @@@ -17,7 -17,7 +17,8 @@@ package org.apache.accumulo.core.client.lexicoder; import java.io.UnsupportedEncodingException; +import java.util.Arrays; + import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; @@@ -49,7 -52,7 +53,7 @@@ public class ReverseLexicoderTest exten Date date3 = new Date(System.currentTimeMillis() + 500); ComparatorDate comparator = Collections.reverseOrder(); - assertSortOrder(revLex, comparator, Arrays.asList(date1, date2, date3)); -assertSortOrder(revLex, comparator, date0, date1, date2, date3); ++assertSortOrder(revLex, comparator, Arrays.asList(date0, date1, date2, date3)); // truncate date to hours long time = System.currentTimeMillis() - (System.currentTimeMillis() % 360);
[1/4] accumulo git commit: ACCUMULO-3385 Fix broken DateLexicoder ordering
Repository: accumulo Updated Branches: refs/heads/1.6 1d288cfe5 - a3267d3e7 refs/heads/master 2f788f482 - 856496138 ACCUMULO-3385 Fix broken DateLexicoder ordering Corrects the ordering so that dates before 1970 actually sort before dates after it. This changes the internal serialization, so please see the release notes for a workaround if you have data written with the buggy form. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a3267d3e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a3267d3e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a3267d3e Branch: refs/heads/1.6 Commit: a3267d3e75ca55b6444cd294c78e55e19e252b43 Parents: 1d288cf Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Dec 5 17:09:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 17:09:13 2014 -0500 -- .../core/client/lexicoder/DateLexicoder.java| 11 + .../client/lexicoder/ReverseLexicoderTest.java | 24 2 files changed, 20 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3267d3e/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java index c93ba70..8533bfe 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java +++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java @@ -20,20 +20,21 @@ import java.util.Date; /** * A lexicoder for date objects. It preserves the native Java sort order for Date. + * * @since 1.6.0 */ public class DateLexicoder implements LexicoderDate { - - private ULongLexicoder longEncoder = new ULongLexicoder(); - + + private LongLexicoder longEncoder = new LongLexicoder(); + @Override public byte[] encode(Date data) { return longEncoder.encode(data.getTime()); } - + @Override public Date decode(byte[] data) { return new Date(longEncoder.decode(data)); } - + } http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3267d3e/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java -- diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java index e6bfca8..3077645 100644 --- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java +++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java @@ -17,6 +17,7 @@ package org.apache.accumulo.core.client.lexicoder; import java.io.UnsupportedEncodingException; +import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; @@ -29,32 +30,35 @@ public class ReverseLexicoderTest extends LexicoderTest { assertSortOrder(new ReverseLexicoderLong(new LongLexicoder()), comp, Long.MIN_VALUE, 0xff1234567890abcdl, 0x1234567890abl, 0xff567890abcdl, 0x7890abcdl, 0xff90abcdl, 0xabcdl, 0xffcdl, -1l, 0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l, 0x1234567890abl, 0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE); - + ComparatorString comp2 = Collections.reverseOrder(); assertSortOrder(new ReverseLexicoderString(new StringLexicoder()), comp2, a, aa, ab, b, aab); - + } - + /** * Just a simple test verifying reverse indexed dates */ @Test public void testReverseSortDates() throws UnsupportedEncodingException { - + ReverseLexicoderDate revLex = new ReverseLexicoderDate(new DateLexicoder()); - + +Calendar cal = Calendar.getInstance(); +cal.set(1920, 1, 2, 3, 4, 5); // create an instance prior to 1970 for ACCUMULO-3385 +Date date0 = new Date(cal.getTimeInMillis()); Date date1 = new Date(); Date date2 = new Date(System.currentTimeMillis() + 1); Date date3 = new Date(System.currentTimeMillis() + 500); - + ComparatorDate comparator = Collections.reverseOrder(); -assertSortOrder(revLex, comparator, date1, date2, date3); - +assertSortOrder(revLex, comparator, date0, date1, date2, date3); + // truncate date to hours long time = System.currentTimeMillis() - (System.currentTimeMillis() % 360); Date date = new Date(time); - + System.out.println(date); - + } }
[2/4] accumulo git commit: ACCUMULO-3385 Fix broken DateLexicoder ordering
ACCUMULO-3385 Fix broken DateLexicoder ordering Corrects the ordering so that dates before 1970 actually sort before dates after it. This changes the internal serialization, so please see the release notes for a workaround if you have data written with the buggy form. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a3267d3e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a3267d3e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a3267d3e Branch: refs/heads/master Commit: a3267d3e75ca55b6444cd294c78e55e19e252b43 Parents: 1d288cf Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Dec 5 17:09:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 17:09:13 2014 -0500 -- .../core/client/lexicoder/DateLexicoder.java| 11 + .../client/lexicoder/ReverseLexicoderTest.java | 24 2 files changed, 20 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3267d3e/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java index c93ba70..8533bfe 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java +++ b/core/src/main/java/org/apache/accumulo/core/client/lexicoder/DateLexicoder.java @@ -20,20 +20,21 @@ import java.util.Date; /** * A lexicoder for date objects. It preserves the native Java sort order for Date. + * * @since 1.6.0 */ public class DateLexicoder implements LexicoderDate { - - private ULongLexicoder longEncoder = new ULongLexicoder(); - + + private LongLexicoder longEncoder = new LongLexicoder(); + @Override public byte[] encode(Date data) { return longEncoder.encode(data.getTime()); } - + @Override public Date decode(byte[] data) { return new Date(longEncoder.decode(data)); } - + } http://git-wip-us.apache.org/repos/asf/accumulo/blob/a3267d3e/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java -- diff --git a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java index e6bfca8..3077645 100644 --- a/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java +++ b/core/src/test/java/org/apache/accumulo/core/client/lexicoder/ReverseLexicoderTest.java @@ -17,6 +17,7 @@ package org.apache.accumulo.core.client.lexicoder; import java.io.UnsupportedEncodingException; +import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.Date; @@ -29,32 +30,35 @@ public class ReverseLexicoderTest extends LexicoderTest { assertSortOrder(new ReverseLexicoderLong(new LongLexicoder()), comp, Long.MIN_VALUE, 0xff1234567890abcdl, 0x1234567890abl, 0xff567890abcdl, 0x7890abcdl, 0xff90abcdl, 0xabcdl, 0xffcdl, -1l, 0l, 0x01l, 0x1234l, 0x123456l, 0x12345678l, 0x1234567890l, 0x1234567890abl, 0x1234567890abcdl, 0x1234567890abcdefl, Long.MAX_VALUE); - + ComparatorString comp2 = Collections.reverseOrder(); assertSortOrder(new ReverseLexicoderString(new StringLexicoder()), comp2, a, aa, ab, b, aab); - + } - + /** * Just a simple test verifying reverse indexed dates */ @Test public void testReverseSortDates() throws UnsupportedEncodingException { - + ReverseLexicoderDate revLex = new ReverseLexicoderDate(new DateLexicoder()); - + +Calendar cal = Calendar.getInstance(); +cal.set(1920, 1, 2, 3, 4, 5); // create an instance prior to 1970 for ACCUMULO-3385 +Date date0 = new Date(cal.getTimeInMillis()); Date date1 = new Date(); Date date2 = new Date(System.currentTimeMillis() + 1); Date date3 = new Date(System.currentTimeMillis() + 500); - + ComparatorDate comparator = Collections.reverseOrder(); -assertSortOrder(revLex, comparator, date1, date2, date3); - +assertSortOrder(revLex, comparator, date0, date1, date2, date3); + // truncate date to hours long time = System.currentTimeMillis() - (System.currentTimeMillis() % 360); Date date = new Date(time); - + System.out.println(date); - + } }
[4/4] accumulo git commit: ACCUMULO-1798 Remove unused import
ACCUMULO-1798 Remove unused import Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/85649613 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/85649613 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/85649613 Branch: refs/heads/master Commit: 856496138300f828b12cb3bf065df80a81031d16 Parents: e67296b Author: Christopher Tubbs ctubb...@apache.org Authored: Fri Dec 5 17:24:06 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 17:24:06 2014 -0500 -- .../src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/85649613/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java -- diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java index bc75062..82e2be2 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java @@ -101,7 +101,6 @@ import org.apache.accumulo.server.master.tableOps.UserCompactionConfig; import org.apache.accumulo.server.problems.ProblemReport; import org.apache.accumulo.server.problems.ProblemReports; import org.apache.accumulo.server.problems.ProblemType; -import org.apache.accumulo.server.security.SystemCredentials; import org.apache.accumulo.server.tablets.TabletTime; import org.apache.accumulo.server.tablets.UniqueNameAllocator; import org.apache.accumulo.server.util.FileUtil;
[1/2] accumulo git commit: ACCUMULO-3178 Create example preferred volumes chooser
Repository: accumulo Updated Branches: refs/heads/master 8031dcda6 - ef909d5fb ACCUMULO-3178 Create example preferred volumes chooser Signed-off-by: Christopher Tubbs ctubb...@apache.org Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ef909d5f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ef909d5f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ef909d5f Branch: refs/heads/master Commit: ef909d5fb6ce0eb83d35ae1e702885fb9b98cf94 Parents: 3f44f8c Author: Jenna Huston jenna.husto...@gmail.com Authored: Tue Oct 28 09:29:52 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 20:04:22 2014 -0500 -- .../server/fs/PreferredVolumeChooser.java | 80 .../accumulo/server/fs/RandomVolumeChooser.java | 2 +- .../apache/accumulo/test/VolumeChooserIT.java | 395 +++ 3 files changed, 476 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/ef909d5f/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java b/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java new file mode 100644 index 000..7ed7bba --- /dev/null +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/PreferredVolumeChooser.java @@ -0,0 +1,80 @@ +/* + * 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.fs; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.server.client.HdfsZooInstance; +import org.apache.accumulo.server.conf.ServerConfigurationFactory; +import org.apache.accumulo.server.conf.TableConfiguration; +import org.apache.log4j.Logger; + +public class PreferredVolumeChooser extends RandomVolumeChooser implements VolumeChooser { + private static final Logger log = Logger.getLogger(PreferredVolumeChooser.class); + + public static final String PREFERRED_VOLUMES_CUSTOM_KEY = Property.TABLE_ARBITRARY_PROP_PREFIX.getKey() + preferredVolumes; + + public PreferredVolumeChooser() {} + + @Override + public String choose(VolumeChooserEnvironment env, String[] options) { +if (!env.hasTableId()) + return super.choose(env, options); + +// Get the current table's properties, and find the preferred volumes property +TableConfiguration config = new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getTableConfiguration(env.getTableId()); +PropertyFilter filter = new PropertyFilter() { + @Override + public boolean accept(String key) { +return PREFERRED_VOLUMES_CUSTOM_KEY.equals(key); + } +}; +MapString,String props = new HashMap(); +config.getProperties(props, filter); +if (props.isEmpty()) { + log.warn(No preferred volumes specified. Defaulting to randomly choosing from instance volumes); + return super.choose(env, options); +} +String volumes = props.get(PREFERRED_VOLUMES_CUSTOM_KEY); +log.trace(In custom chooser); +log.trace(Volumes: + volumes); +log.trace(TableID: + env.getTableId()); + +ArrayListString prefVol = new ArrayListString(); +// If the preferred volumes property is specified, split the returned string by the comma and add them to a preferred volumes list +prefVol.addAll(Arrays.asList(volumes.split(,))); + +// Change the given array to a List and only keep the preferred volumes that are in the given array. +prefVol.retainAll(Arrays.asList(options)); + +// If there are no preferred volumes left, then warn the user and choose randomly from the instance volumes +if (prefVol.isEmpty()) { + log.warn(Preferred volumes are not instance volumes. Defaulting to
[2/2] accumulo git commit: ACCUMULO-3177 Create a per table volume chooser
ACCUMULO-3177 Create a per table volume chooser Signed-off-by: Christopher Tubbs ctubb...@apache.org Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3f44f8c1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3f44f8c1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3f44f8c1 Branch: refs/heads/master Commit: 3f44f8c191941ecb57656eaa5ddd4177c71cbfe0 Parents: 8031dcd Author: Jenna Huston jenna.husto...@gmail.com Authored: Mon Oct 27 14:06:32 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Fri Dec 5 20:04:22 2014 -0500 -- .../org/apache/accumulo/core/conf/Property.java | 4 +- .../server/fs/PerTableVolumeChooser.java| 42 .../accumulo/server/fs/RandomVolumeChooser.java | 7 ++-- .../accumulo/server/fs/VolumeChooser.java | 3 +- .../server/fs/VolumeChooserEnvironment.java | 37 + .../accumulo/server/fs/VolumeManager.java | 4 +- .../accumulo/server/fs/VolumeManagerImpl.java | 5 ++- .../apache/accumulo/server/fs/VolumeUtil.java | 4 +- .../apache/accumulo/server/init/Initialize.java | 37 - .../apache/accumulo/server/util/FileUtil.java | 6 ++- .../accumulo/server/util/MetadataTableUtil.java | 6 ++- .../accumulo/server/util/RandomizeVolumes.java | 4 +- .../accumulo/server/util/TabletOperations.java | 4 +- .../java/org/apache/accumulo/master/Master.java | 3 +- .../accumulo/master/TabletGroupWatcher.java | 3 +- .../accumulo/master/tableOps/CreateTable.java | 4 +- .../accumulo/master/tableOps/ImportTable.java | 4 +- .../master/tableOps/ImportTableTest.java| 4 +- .../apache/accumulo/tserver/log/DfsLogger.java | 4 +- .../tserver/TabletServerSyncCheckTest.java | 3 +- .../apache/accumulo/test/FairVolumeChooser.java | 3 +- 21 files changed, 145 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/3f44f8c1/core/src/main/java/org/apache/accumulo/core/conf/Property.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java index cc7d548..4c2d0b4 100644 --- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java +++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java @@ -165,7 +165,7 @@ public enum Property { GENERAL_SIMPLETIMER_THREADPOOL_SIZE(general.server.simpletimer.threadpool.size, 1, PropertyType.COUNT, The number of threads to use for + server-internal scheduled tasks), @Experimental - GENERAL_VOLUME_CHOOSER(general.volume.chooser, org.apache.accumulo.server.fs.RandomVolumeChooser, PropertyType.CLASSNAME, + GENERAL_VOLUME_CHOOSER(general.volume.chooser, org.apache.accumulo.server.fs.PerTableVolumeChooser, PropertyType.CLASSNAME, The class that will be used to select which volume will be used to create new files.), GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS(general.security.credential.provider.paths, , PropertyType.STRING, Comma-separated list of paths to CredentialProviders), GENERAL_LEGACY_METRICS(general.legacy.metrics, false, PropertyType.BOOLEAN, @@ -467,6 +467,8 @@ public enum Property { TABLE_REPLICATION_TARGET(table.replication.target., null, PropertyType.PREFIX, Enumerate a mapping of other systems which this table should + replicate their data to. The key suffix is the identifying cluster name and the value is an identifier for a location on the target system, + e.g. the ID of the table on the target to replicate to), + TABLE_VOLUME_CHOOSER(table.volume.chooser, org.apache.accumulo.server.fs.RandomVolumeChooser, PropertyType.CLASSNAME, + The class that will be used to select which volume will be used to create new files for this table.), // VFS ClassLoader properties VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY(AccumuloVFSClassLoader.VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY, , PropertyType.STRING, http://git-wip-us.apache.org/repos/asf/accumulo/blob/3f44f8c1/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java b/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java new file mode 100644 index 000..7a825c7 --- /dev/null +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional
accumulo git commit: ACCUMULO-3306 Remove unused import
Repository: accumulo Updated Branches: refs/heads/master 83690568b - 0f2bd37d4 ACCUMULO-3306 Remove unused import Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0f2bd37d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0f2bd37d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0f2bd37d Branch: refs/heads/master Commit: 0f2bd37d409f9e67185f4cdef7da28dd0ee878d5 Parents: 8369056 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 8 18:28:50 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 8 18:28:50 2014 -0500 -- .../src/main/java/org/apache/accumulo/server/util/PortUtils.java| 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0f2bd37d/server/base/src/main/java/org/apache/accumulo/server/util/PortUtils.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/PortUtils.java b/server/base/src/main/java/org/apache/accumulo/server/util/PortUtils.java index c50d05b..a03e626 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/PortUtils.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/PortUtils.java @@ -18,7 +18,6 @@ package org.apache.accumulo.server.util; import java.io.IOException; import java.net.ServerSocket; -import java.util.Random; public class PortUtils {
[4/4] accumulo git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/9a9b2de8 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/9a9b2de8 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/9a9b2de8 Branch: refs/heads/master Commit: 9a9b2de83c1803d821e6380d10c0186c27cff2ae Parents: 6e16d55 67a4262 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 10 20:13:55 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 10 20:13:55 2014 -0500 -- .../examples/simple/client/TracingExample.java | 23 .../replication/merkle/cli/CompareTables.java | 12 ++ 2 files changed, 26 insertions(+), 9 deletions(-) --
[1/4] accumulo git commit: ACCUMULO-3401 Clean up old AbstractMacIT classes
Repository: accumulo Updated Branches: refs/heads/1.6 98c524e34 - 0532b627b refs/heads/master 67a426277 - 9a9b2de83 ACCUMULO-3401 Clean up old AbstractMacIT classes Remove usage of deprecated SimpleMacIT and consolidate AbstractMacIT with ConfigurableMacIT. Update javadocs to clarify usage. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0532b627 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0532b627 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0532b627 Branch: refs/heads/1.6 Commit: 0532b627b5e86c3e56a0a1009676db7392f81a3a Parents: 98c524e Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 10 18:28:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 10 18:28:13 2014 -0500 -- .../accumulo/harness/AccumuloClusterIT.java | 2 +- .../accumulo/harness/SharedMiniClusterIT.java | 4 +- .../apache/accumulo/test/ImportExportIT.java| 5 +- .../accumulo/test/functional/AbstractMacIT.java | 89 - .../test/functional/ConfigurableMacIT.java | 76 --- .../test/functional/HalfDeadTServerIT.java | 3 +- .../accumulo/test/functional/SimpleMacIT.java | 125 +-- 7 files changed, 71 insertions(+), 233 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java index d9d52d6..8f7e1b7 100644 --- a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java @@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory; import com.google.common.base.Preconditions; /** - * General Integration-Test base class that provides an Accumulo instance + * General Integration-Test base class that provides access to an Accumulo instance for testing. This instance could be MAC or a standalone instance. */ public abstract class AccumuloClusterIT extends AccumuloIT implements MiniClusterConfigurationCallback { private static final Logger log = LoggerFactory.getLogger(AccumuloClusterIT.class); http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java index 3f7a8cc..2380f66 100644 --- a/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java @@ -29,8 +29,8 @@ import org.junit.BeforeClass; /** * Convenience class which starts a single MAC instance for a test to leverage. * - * There isn't a good way to build this off of the AccumuloClusterIT (as would be the logical place) because we need to start the MiniAccumuloCluster in a - * static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes + * There isn't a good way to build this off of the {@link AccumuloClusterIT} (as would be the logical place) because we need to start the MiniAccumuloCluster in + * a static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes * can't expose any information to tell the base class that it is to perform the one-MAC-per-class semantics. */ public abstract class SharedMiniClusterIT extends AccumuloIT { http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java b/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java index 43606b4..26a1c46 100644 --- a/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java +++ b/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java @@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.functional.SimpleMacIT; +import org.apache.accumulo.harness.SharedMiniClusterIT; import org.apache.commons.io.FileUtils; import
[3/4] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Conflicts: test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6e16d55f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6e16d55f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6e16d55f Branch: refs/heads/master Commit: 6e16d55f1e13177a2c59ef73a076e8f41d8a695b Parents: 524a813 0532b62 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 10 18:52:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 10 18:52:24 2014 -0500 -- .../accumulo/harness/AccumuloClusterIT.java | 2 +- .../accumulo/harness/SharedMiniClusterIT.java | 4 +- .../test/ArbitraryTablePropertiesIT.java| 5 +- .../apache/accumulo/test/ImportExportIT.java| 5 +- .../accumulo/test/SplitCancelsMajCIT.java | 5 +- .../accumulo/test/functional/AbstractMacIT.java | 93 .../test/functional/ConfigurableMacIT.java | 79 --- .../functional/DeletedTablesDontFlushIT.java| 4 +- .../test/functional/HalfDeadTServerIT.java | 3 +- .../accumulo/test/functional/SimpleMacIT.java | 142 +-- .../test/replication/CyclicReplicationIT.java | 4 +- ...bageCollectorCommunicatesWithTServersIT.java | 5 +- .../test/replication/StatusCombinerMacIT.java | 5 +- 13 files changed, 84 insertions(+), 272 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/6e16d55f/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java -- diff --cc test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java index 7cc136f,000..aa5c164 mode 100644,00..100644 --- a/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java @@@ -1,198 -1,0 +1,197 @@@ +/* + * 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 java.util.Map.Entry; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.security.TablePermission; - import org.apache.accumulo.test.functional.SimpleMacIT; ++import org.apache.accumulo.harness.SharedMiniClusterIT; +import org.apache.log4j.Logger; +import org.junit.Assert; +import org.junit.Test; + - @SuppressWarnings(deprecation) - public class ArbitraryTablePropertiesIT extends SimpleMacIT { ++public class ArbitraryTablePropertiesIT extends SharedMiniClusterIT { + private static final Logger log = Logger.getLogger(ArbitraryTablePropertiesIT.class); + + @Override + protected int defaultTimeoutSeconds() { +return 30; + }; + + // Test set, get, and remove arbitrary table properties on the root account + @Test + public void setGetRemoveTablePropertyRoot() throws Exception { +log.debug(Starting setGetRemoveTablePropertyRoot test ); + +// make a table +final String tableName = getUniqueNames(1)[0]; +final Connector conn = getConnector(); +conn.tableOperations().create(tableName); + +// Set variables for the property name to use and the initial value +String propertyName = table.custom.description; +String description1 = Description; + +// Make sure the property name is valid +Assert.assertTrue(Property.isValidPropertyKey(propertyName)); +// Set the property to the desired value +conn.tableOperations().setProperty(tableName, propertyName,
[2/4] accumulo git commit: ACCUMULO-3401 Clean up old AbstractMacIT classes
ACCUMULO-3401 Clean up old AbstractMacIT classes Remove usage of deprecated SimpleMacIT and consolidate AbstractMacIT with ConfigurableMacIT. Update javadocs to clarify usage. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0532b627 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0532b627 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0532b627 Branch: refs/heads/master Commit: 0532b627b5e86c3e56a0a1009676db7392f81a3a Parents: 98c524e Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 10 18:28:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 10 18:28:13 2014 -0500 -- .../accumulo/harness/AccumuloClusterIT.java | 2 +- .../accumulo/harness/SharedMiniClusterIT.java | 4 +- .../apache/accumulo/test/ImportExportIT.java| 5 +- .../accumulo/test/functional/AbstractMacIT.java | 89 - .../test/functional/ConfigurableMacIT.java | 76 --- .../test/functional/HalfDeadTServerIT.java | 3 +- .../accumulo/test/functional/SimpleMacIT.java | 125 +-- 7 files changed, 71 insertions(+), 233 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java index d9d52d6..8f7e1b7 100644 --- a/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/AccumuloClusterIT.java @@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory; import com.google.common.base.Preconditions; /** - * General Integration-Test base class that provides an Accumulo instance + * General Integration-Test base class that provides access to an Accumulo instance for testing. This instance could be MAC or a standalone instance. */ public abstract class AccumuloClusterIT extends AccumuloIT implements MiniClusterConfigurationCallback { private static final Logger log = LoggerFactory.getLogger(AccumuloClusterIT.class); http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java b/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java index 3f7a8cc..2380f66 100644 --- a/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java +++ b/test/src/test/java/org/apache/accumulo/harness/SharedMiniClusterIT.java @@ -29,8 +29,8 @@ import org.junit.BeforeClass; /** * Convenience class which starts a single MAC instance for a test to leverage. * - * There isn't a good way to build this off of the AccumuloClusterIT (as would be the logical place) because we need to start the MiniAccumuloCluster in a - * static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes + * There isn't a good way to build this off of the {@link AccumuloClusterIT} (as would be the logical place) because we need to start the MiniAccumuloCluster in + * a static BeforeClass-annotated method. Because it is static and invoked before any other BeforeClass methods in the implementation, the actual test classes * can't expose any information to tell the base class that it is to perform the one-MAC-per-class semantics. */ public abstract class SharedMiniClusterIT extends AccumuloIT { http://git-wip-us.apache.org/repos/asf/accumulo/blob/0532b627/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java b/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java index 43606b4..26a1c46 100644 --- a/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java +++ b/test/src/test/java/org/apache/accumulo/test/ImportExportIT.java @@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.functional.SimpleMacIT; +import org.apache.accumulo.harness.SharedMiniClusterIT; import org.apache.commons.io.FileUtils; import org.junit.Assert; import org.junit.Test; @@ -53,8 +53,7 @@ import com.google.common.io.Files; * */ // TODO Can switch to
[3/3] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' 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/923accb6 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/923accb6 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/923accb6 Branch: refs/heads/master Commit: 923accb68d7c79467291b6adfca74b114178944e Parents: bd4d190 c07e3d0 Author: Christopher Tubbs ctubb...@apache.org Authored: Sat Dec 13 14:18:34 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Sat Dec 13 14:18:34 2014 -0500 -- .../minicluster/impl/CleanShutdownMacTest.java | 2 +- pom.xml | 9 + .../java/org/apache/accumulo/master/Master.java | 16 3 files changed, 14 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/923accb6/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/923accb6/pom.xml -- diff --cc pom.xml index 31601a1,f40a650..b0300af --- a/pom.xml +++ b/pom.xml @@@ -124,9 -122,9 +124,10 @@@ forkCount1/forkCount !-- overwritten in profiles hadoop-1 or hadoop-2 -- hadoop.version2.2.0/hadoop.version +htrace.version3.0.4/htrace.version httpclient.version3.1/httpclient.version -java.ver1.6/java.ver -jetty.version8.1.15.v20140411/jetty.version ++java.ver1.7/java.ver +jetty.version9.1.5.v20140505/jetty.version !-- the maven-release-plugin makes this recommendation, due to plugin bugs -- maven.min-version3.0.4/maven.min-version !-- surefire/failsafe plugin option -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/923accb6/server/master/src/main/java/org/apache/accumulo/master/Master.java --
[2/3] accumulo git commit: ACCUMULO-2981 Fix warnings building in JDK8
ACCUMULO-2981 Fix warnings building in JDK8 Remove use of single underscore as an identifier (replaced with U+2054). And fix type safety check failure with EasyMock in JDK8. Make it easier to switch Java version by moving it to a Maven property. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/c07e3d06 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/c07e3d06 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/c07e3d06 Branch: refs/heads/master Commit: c07e3d0636d7922ff2040200cde7831e2100f624 Parents: 1a944c0 Author: Christopher Tubbs ctubb...@apache.org Authored: Sat Dec 13 14:00:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Sat Dec 13 14:09:11 2014 -0500 -- .../minicluster/impl/CleanShutdownMacTest.java | 2 +- pom.xml | 9 + .../java/org/apache/accumulo/master/Master.java | 16 3 files changed, 14 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/c07e3d06/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java -- diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java index 2ac8d6f..09ee9f4 100644 --- a/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java +++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/impl/CleanShutdownMacTest.java @@ -44,7 +44,7 @@ public class CleanShutdownMacTest { cluster.setShutdownExecutor(mockService); EasyMock.expect(future.get()).andReturn(0).anyTimes(); - EasyMock.expect(mockService.submit(EasyMock.anyObject(Callable.class))).andReturn(future).anyTimes(); + EasyMock.expect(mockService.Integersubmit(EasyMock.anyObject(Callable.class))).andReturn(future).anyTimes(); EasyMock.expect(mockService.shutdownNow()).andReturn(Collections.Runnable emptyList()).once(); EasyMock.replay(mockService, future); http://git-wip-us.apache.org/repos/asf/accumulo/blob/c07e3d06/pom.xml -- diff --git a/pom.xml b/pom.xml index 824f56c..f40a650 100644 --- a/pom.xml +++ b/pom.xml @@ -123,6 +123,7 @@ !-- overwritten in profiles hadoop-1 or hadoop-2 -- hadoop.version2.2.0/hadoop.version httpclient.version3.1/httpclient.version +java.ver1.6/java.ver jetty.version8.1.15.v20140411/jetty.version !-- the maven-release-plugin makes this recommendation, due to plugin bugs -- maven.min-version3.0.4/maven.min-version @@ -572,8 +573,8 @@ plugin artifactIdmaven-compiler-plugin/artifactId configuration -source1.6/source -target1.6/target +source${java.ver}/source +target${java.ver}/target optimizetrue/optimize showDeprecationtrue/showDeprecation showWarningstrue/showWarnings @@ -598,7 +599,7 @@ encoding${project.reporting.outputEncoding}/encoding quiettrue/quiet reportOutputDirectorydocs/reportOutputDirectory -javadocVersion1.6/javadocVersion +javadocVersion${java.ver}/javadocVersion additionalJOption-J-Xmx512m/additionalJOption /configuration /plugin @@ -977,7 +978,7 @@ /excludes formathtml/format includeTeststrue/includeTests - targetJdk1.6/targetJdk + targetJdk${java.ver}/targetJdk /configuration /plugin plugin http://git-wip-us.apache.org/repos/asf/accumulo/blob/c07e3d06/server/master/src/main/java/org/apache/accumulo/master/Master.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java index 83e83cf..496b6a9 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java @@ -188,17 +188,17 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt } static final boolean X = true; - static final boolean _ = false; + static final boolean â = false; // use U+2054 because a single underscore is deprecated as an identifier in Java 8. // @formatter:off static final boolean transitionOK[][] = { // INITIAL HAVE_LOCK SAFE_MODE NORMAL UNLOAD_META UNLOAD_ROOT STOP - /* INITIAL */
[2/5] accumulo git commit: ACCUMULO-3176 Expand on javadocs and remove deprecated usage
ACCUMULO-3176 Expand on javadocs and remove deprecated usage Also fix a few MockTableOperations bugs Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b4da8757 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b4da8757 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b4da8757 Branch: refs/heads/master Commit: b4da8757bcd0932a18d38858e45e688a4a1dc577 Parents: afd1cb1 Author: Christopher Tubbs ctubb...@apache.org Authored: Tue Nov 25 12:42:45 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Tue Nov 25 12:42:45 2014 -0500 -- .../core/client/NewTableConfiguration.java | 36 ++-- .../core/client/impl/TableOperationsImpl.java | 4 +-- .../accumulo/core/client/mock/MockAccumulo.java | 3 +- .../core/client/mock/MockTableOperations.java | 4 +-- .../client/mock/MockTableOperationsTest.java| 5 +-- .../minicluster/MiniAccumuloClusterTest.java| 3 +- .../org/apache/accumulo/proxy/ProxyServer.java | 6 +++- .../accumulo/test/ConditionalWriterIT.java | 3 +- .../test/CreateTableWithNewTableConfigIT.java | 11 -- .../org/apache/accumulo/test/NamespacesIT.java | 3 +- .../java/org/apache/accumulo/test/VolumeIT.java | 3 +- .../accumulo/test/functional/LogicalTimeIT.java | 3 +- .../accumulo/test/functional/MergeIT.java | 3 +- .../test/replication/CyclicReplicationIT.java | 5 +-- 14 files changed, 70 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b4da8757/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java index 515919f..afe0ebf 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java @@ -24,10 +24,12 @@ import java.util.Map; import org.apache.accumulo.core.client.admin.TimeType; import org.apache.accumulo.core.iterators.IteratorUtil; +import org.apache.accumulo.core.iterators.user.VersioningIterator; /** - * This object stores table creation parameters. Currently including: TimeType, limitVersion, and user specified initial properties - * + * This object stores table creation parameters. Currently includes: {@link TimeType}, whether to include default iterators, and user-specified initial + * properties + * * @since 1.7.0 */ public class NewTableConfiguration { @@ -39,6 +41,13 @@ public class NewTableConfiguration { private MapString,String properties = new HashMapString,String(); + /** + * Configure logical or millisecond time for tables created with this configuration. + * + * @param tt + * the time type to use; defaults to milliseconds + * @return this + */ public NewTableConfiguration setTimeType(TimeType tt) { checkArgument(tt != null, TimeType is null); @@ -46,18 +55,34 @@ public class NewTableConfiguration { return this; } + /** + * Retrieve the time type currently configured. + * + * @return the time type + */ public TimeType getTimeType() { return timeType; } /** - * Currently the only default iterator is the versioning iterator. This method will cause the table to be created without the versioning iterator + * Currently the only default iterator is the {@link VersioningIterator}. This method will cause the table to be created without that iterator, or any others + * which may become defaults in the future. + * + * @return this */ public NewTableConfiguration withoutDefaultIterators() { this.limitVersion = false; return this; } + /** + * Sets additional properties to be applied to tables created with this configuration. Additional calls to this method replaces properties set by previous + * calls. + * + * @param prop + * additional properties to add to the table when it is created + * @return this + */ public NewTableConfiguration setProperties(MapString,String prop) { checkArgument(prop != null, properties is null); @@ -65,6 +90,11 @@ public class NewTableConfiguration { return this; } + /** + * Retrieves the complete set of currently configured table properties to be applied to a table when this configuration object is used. + * + * @return the current properties configured + */ public MapString,String getProperties() { MapString,String propertyMap = new HashMap();
[4/5] accumulo git commit: ACCUMULO-3401 Remove use of SimpleMacIT from ACCUMULO-3176
ACCUMULO-3401 Remove use of SimpleMacIT from ACCUMULO-3176 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/17898c32 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/17898c32 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/17898c32 Branch: refs/heads/master Commit: 17898c329750c3400acd926d9fbab13e01e51828 Parents: d83eca8 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 13:03:49 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 13:03:49 2014 -0500 -- .../apache/accumulo/test/CreateTableWithNewTableConfigIT.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/17898c32/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java -- diff --git a/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java b/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java index ba7a3ca..b2458a1 100644 --- a/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java +++ b/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java @@ -32,7 +32,7 @@ import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.metadata.MetadataTable; import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily; import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.test.functional.SimpleMacIT; +import org.apache.accumulo.harness.SharedMiniClusterIT; import org.apache.log4j.Logger; import org.junit.Assert; import org.junit.Test; @@ -40,7 +40,7 @@ import org.junit.Test; /** * */ -public class CreateTableWithNewTableConfigIT extends SimpleMacIT { +public class CreateTableWithNewTableConfigIT extends SharedMiniClusterIT { static private final Logger log = Logger.getLogger(CreateTableWithNewTableConfigIT.class); @Override
[5/5] accumulo git commit: Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1e9a42cc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1e9a42cc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1e9a42cc Branch: refs/heads/master Commit: 1e9a42cc678e541cd822bf3f1fbe0b6191cc4599 Parents: 17898c3 80f44ad Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 13:22:08 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 13:22:08 2014 -0500 -- .../accumulo/monitor/util/celltypes/PreciseNumberType.java | 4 ++-- .../accumulo/monitor/util/celltypes/PreciseNumberTypeTest.java | 4 ++-- .../apache/accumulo/test/TracerRecoversAfterOfflineTableIT.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) --
[3/5] accumulo git commit: Merge branch 'ACCUMULO-3176'
Merge branch 'ACCUMULO-3176' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d83eca8a Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d83eca8a Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d83eca8a Branch: refs/heads/master Commit: d83eca8a6a52aa00b4ad2619104a9cc58c5e2a42 Parents: bf6ca04 b4da875 Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 13:00:12 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 13:00:12 2014 -0500 -- .../core/client/NewTableConfiguration.java | 108 ++ .../core/client/admin/TableOperations.java | 22 +++ .../core/client/impl/TableOperationsImpl.java | 31 ++- .../accumulo/core/client/mock/MockAccumulo.java | 24 ++- .../accumulo/core/client/mock/MockTable.java| 32 ++- .../core/client/mock/MockTableOperations.java | 29 ++- .../client/impl/TableOperationsHelperTest.java | 6 + .../client/mock/MockTableOperationsTest.java| 5 +- .../minicluster/MiniAccumuloClusterTest.java| 3 +- .../org/apache/accumulo/proxy/ProxyServer.java | 8 +- .../shell/commands/CreateTableCommand.java | 19 +- .../accumulo/test/ConditionalWriterIT.java | 3 +- .../test/CreateTableWithNewTableConfigIT.java | 196 +++ .../org/apache/accumulo/test/NamespacesIT.java | 3 +- .../org/apache/accumulo/test/ShellServerIT.java | 29 ++- .../java/org/apache/accumulo/test/VolumeIT.java | 3 +- .../accumulo/test/functional/LogicalTimeIT.java | 3 +- .../accumulo/test/functional/MergeIT.java | 3 +- .../test/replication/CyclicReplicationIT.java | 5 +- 19 files changed, 500 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java -- diff --cc core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java index f8d2ccd,798b6f3..ff0a46a --- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java +++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java @@@ -34,9 -34,9 +34,10 @@@ import org.apache.accumulo.core.client. import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.accumulo.core.client.NamespaceNotFoundException; + import org.apache.accumulo.core.client.NewTableConfiguration; import org.apache.accumulo.core.client.TableExistsException; import org.apache.accumulo.core.client.TableNotFoundException; +import org.apache.accumulo.core.client.admin.CompactionConfig; import org.apache.accumulo.core.client.admin.DiskUsage; import org.apache.accumulo.core.client.admin.FindMax; import org.apache.accumulo.core.client.admin.TimeType; http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/core/src/test/java/org/apache/accumulo/core/client/impl/TableOperationsHelperTest.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/test/src/test/java/org/apache/accumulo/test/NamespacesIT.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d83eca8a/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java -- diff --cc
[1/5] accumulo git commit: ACCUMULO-3176 Create Table with initial properties
Repository: accumulo Updated Branches: refs/heads/master 80f44ad1b - 1e9a42cc6 ACCUMULO-3176 Create Table with initial properties Signed-off-by: Christopher Tubbs ctubb...@apache.org Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/afd1cb13 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/afd1cb13 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/afd1cb13 Branch: refs/heads/master Commit: afd1cb13383e104d1f2fdcea25931ec8691d0b45 Parents: bfcb0ed Author: Jenna Huston jenna.husto...@gmail.com Authored: Tue Sep 30 14:17:10 2014 -0400 Committer: Christopher Tubbs ctubb...@apache.org Committed: Tue Nov 25 11:29:08 2014 -0500 -- .../core/client/NewTableConfiguration.java | 78 .../core/client/admin/TableOperations.java | 22 +++ .../core/client/impl/TableOperationsImpl.java | 31 ++- .../accumulo/core/client/mock/MockAccumulo.java | 23 ++- .../accumulo/core/client/mock/MockTable.java| 32 +++- .../core/client/mock/MockTableOperations.java | 29 ++- .../client/impl/TableOperationsHelperTest.java | 6 + .../org/apache/accumulo/proxy/ProxyServer.java | 2 +- .../shell/commands/CreateTableCommand.java | 19 +- .../test/CreateTableWithNewTableConfigIT.java | 191 +++ .../org/apache/accumulo/test/ShellServerIT.java | 29 ++- 11 files changed, 441 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/afd1cb13/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java new file mode 100644 index 000..515919f --- /dev/null +++ b/core/src/main/java/org/apache/accumulo/core/client/NewTableConfiguration.java @@ -0,0 +1,78 @@ +/* + * 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.client; + +import static com.google.common.base.Preconditions.checkArgument; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.apache.accumulo.core.client.admin.TimeType; +import org.apache.accumulo.core.iterators.IteratorUtil; + +/** + * This object stores table creation parameters. Currently including: TimeType, limitVersion, and user specified initial properties + * + * @since 1.7.0 + */ +public class NewTableConfiguration { + + private static final TimeType DEFAULT_TIME_TYPE = TimeType.MILLIS; + private TimeType timeType = DEFAULT_TIME_TYPE; + + private boolean limitVersion = true; + + private MapString,String properties = new HashMapString,String(); + + public NewTableConfiguration setTimeType(TimeType tt) { +checkArgument(tt != null, TimeType is null); + +this.timeType = tt; +return this; + } + + public TimeType getTimeType() { +return timeType; + } + + /** + * Currently the only default iterator is the versioning iterator. This method will cause the table to be created without the versioning iterator + */ + public NewTableConfiguration withoutDefaultIterators() { +this.limitVersion = false; +return this; + } + + public NewTableConfiguration setProperties(MapString,String prop) { +checkArgument(prop != null, properties is null); + +this.properties = new HashMapString,String(prop); +return this; + } + + public MapString,String getProperties() { +MapString,String propertyMap = new HashMap(); + +if (limitVersion) { + propertyMap.putAll(IteratorUtil.generateInitialTableProperties(limitVersion)); +} + +propertyMap.putAll(properties); +return Collections.unmodifiableMap(propertyMap); + } +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/afd1cb13/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java -- diff --git
Git Push Summary
Repository: accumulo Updated Branches: refs/heads/ACCUMULO-3176 [deleted] b4da8757b
[3/3] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/dadb7bb1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/dadb7bb1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/dadb7bb1 Branch: refs/heads/master Commit: dadb7bb114c8f99ff9a82a74e508595f640c81fb Parents: 4cedbeb b6f9a1e Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:08:53 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:08:53 2014 -0500 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/dadb7bb1/pom.xml --
[1/3] accumulo git commit: ACCUMULO-3405 Bump findbugs-maven-plugin to 3.0.0
Repository: accumulo Updated Branches: refs/heads/1.6 9558b0d05 - b6f9a1e18 refs/heads/master 4cedbeb60 - dadb7bb11 ACCUMULO-3405 Bump findbugs-maven-plugin to 3.0.0 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b6f9a1e1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b6f9a1e1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b6f9a1e1 Branch: refs/heads/1.6 Commit: b6f9a1e18cac2f7ea5dbafd4696f012067247f5d Parents: 9558b0d Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:08:06 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:08:06 2014 -0500 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b6f9a1e1/pom.xml -- diff --git a/pom.xml b/pom.xml index f40a650..0d3323f 100644 --- a/pom.xml +++ b/pom.xml @@ -498,7 +498,7 @@ plugin groupIdorg.codehaus.mojo/groupId artifactIdfindbugs-maven-plugin/artifactId - version2.5.3/version + version3.0.0/version configuration xmlOutputtrue/xmlOutput effortMax/effort
[2/3] accumulo git commit: ACCUMULO-3405 Bump findbugs-maven-plugin to 3.0.0
ACCUMULO-3405 Bump findbugs-maven-plugin to 3.0.0 Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b6f9a1e1 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b6f9a1e1 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b6f9a1e1 Branch: refs/heads/master Commit: b6f9a1e18cac2f7ea5dbafd4696f012067247f5d Parents: 9558b0d Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:08:06 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:08:06 2014 -0500 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b6f9a1e1/pom.xml -- diff --git a/pom.xml b/pom.xml index f40a650..0d3323f 100644 --- a/pom.xml +++ b/pom.xml @@ -498,7 +498,7 @@ plugin groupIdorg.codehaus.mojo/groupId artifactIdfindbugs-maven-plugin/artifactId - version2.5.3/version + version3.0.0/version configuration xmlOutputtrue/xmlOutput effortMax/effort
[2/3] accumulo git commit: ACCUMULO-3400 Add sanity check for VolumeChooser return
ACCUMULO-3400 Add sanity check for VolumeChooser return Backports the sanity check from ACCUMULO-3393 to 1.6. Ensures that VolumeChoosers only choose from the available options, and don't manifest choices of their own to return, which aren't available. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/86f7c1b0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/86f7c1b0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/86f7c1b0 Branch: refs/heads/master Commit: 86f7c1b0866025171a1993abc01ce60ccfca859a Parents: b6f9a1e Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:33:51 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:33:51 2014 -0500 -- .../accumulo/server/fs/VolumeManagerImpl.java | 12 +- .../server/fs/VolumeManagerImplTest.java| 23 2 files changed, 34 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f7c1b0/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java index 38a8369..912d031 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java @@ -44,6 +44,7 @@ import org.apache.accumulo.core.volume.NonConfiguredVolume; import org.apache.accumulo.core.volume.Volume; import org.apache.accumulo.core.volume.VolumeConfiguration; import org.apache.accumulo.server.conf.ServerConfiguration; +import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; @@ -571,9 +572,18 @@ public class VolumeManagerImpl implements VolumeManager { return getVolumeByPath(dir).getFileSystem().getContentSummary(dir); } + // Only used as a fall back if the configured chooser misbehaves. + private final VolumeChooser failsafeChooser = new RandomVolumeChooser(); + @Override public String choose(String[] options) { -return chooser.choose(options); +final String choice = chooser.choose(options); +if (!(ArrayUtils.contains(options, choice))) { + log.error(The configured volume chooser, ' + chooser.getClass() + ', or one of its delegates returned a volume not in the set of options provided; + + will continue by relying on a RandomVolumeChooser. You should investigate and correct the named chooser.); + return failsafeChooser.choose(options); +} +return choice; } @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f7c1b0/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java -- diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java index 582822a..26a23a3 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java @@ -22,6 +22,7 @@ import java.util.List; import org.apache.accumulo.core.conf.ConfigurationCopy; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.server.fs.VolumeManager.FileType; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.fs.Path; import org.junit.Assert; import org.junit.Before; @@ -91,4 +92,26 @@ public class VolumeManagerImplTest { conf.set(Property.INSTANCE_VOLUMES, viewfs://dummy); VolumeManagerImpl.get(conf); } + + public static class WrongVolumeChooser implements VolumeChooser { +@Override +public String choose(String[] options) { + return file://totally-not-given/; +} + } + + @SuppressWarnings(deprecation) + private static final Property INSTANCE_DFS_URI = Property.INSTANCE_DFS_URI; + + @Test + public void chooseFromOptions() throws Exception { +ListString volumes = Arrays.asList(file://one/, file://two/, file://three/); +ConfigurationCopy conf = new ConfigurationCopy(); +conf.set(INSTANCE_DFS_URI, volumes.get(0)); +conf.set(Property.INSTANCE_VOLUMES, StringUtils.join(volumes,,)); +conf.set(Property.GENERAL_VOLUME_CHOOSER, WrongVolumeChooser.class.getName()); +VolumeManager vm = VolumeManagerImpl.get(conf); +String choice = vm.choose(volumes.toArray(new String[0])); +
[1/3] accumulo git commit: ACCUMULO-3400 Add sanity check for VolumeChooser return
Repository: accumulo Updated Branches: refs/heads/1.6 b6f9a1e18 - 86f7c1b08 refs/heads/master dadb7bb11 - b1dc56ec2 ACCUMULO-3400 Add sanity check for VolumeChooser return Backports the sanity check from ACCUMULO-3393 to 1.6. Ensures that VolumeChoosers only choose from the available options, and don't manifest choices of their own to return, which aren't available. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/86f7c1b0 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/86f7c1b0 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/86f7c1b0 Branch: refs/heads/1.6 Commit: 86f7c1b0866025171a1993abc01ce60ccfca859a Parents: b6f9a1e Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:33:51 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:33:51 2014 -0500 -- .../accumulo/server/fs/VolumeManagerImpl.java | 12 +- .../server/fs/VolumeManagerImplTest.java| 23 2 files changed, 34 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f7c1b0/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java index 38a8369..912d031 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java +++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java @@ -44,6 +44,7 @@ import org.apache.accumulo.core.volume.NonConfiguredVolume; import org.apache.accumulo.core.volume.Volume; import org.apache.accumulo.core.volume.VolumeConfiguration; import org.apache.accumulo.server.conf.ServerConfiguration; +import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang.StringUtils; import org.apache.hadoop.conf.Configuration; @@ -571,9 +572,18 @@ public class VolumeManagerImpl implements VolumeManager { return getVolumeByPath(dir).getFileSystem().getContentSummary(dir); } + // Only used as a fall back if the configured chooser misbehaves. + private final VolumeChooser failsafeChooser = new RandomVolumeChooser(); + @Override public String choose(String[] options) { -return chooser.choose(options); +final String choice = chooser.choose(options); +if (!(ArrayUtils.contains(options, choice))) { + log.error(The configured volume chooser, ' + chooser.getClass() + ', or one of its delegates returned a volume not in the set of options provided; + + will continue by relying on a RandomVolumeChooser. You should investigate and correct the named chooser.); + return failsafeChooser.choose(options); +} +return choice; } @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f7c1b0/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java -- diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java index 582822a..26a23a3 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java @@ -22,6 +22,7 @@ import java.util.List; import org.apache.accumulo.core.conf.ConfigurationCopy; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.server.fs.VolumeManager.FileType; +import org.apache.commons.lang.StringUtils; import org.apache.hadoop.fs.Path; import org.junit.Assert; import org.junit.Before; @@ -91,4 +92,26 @@ public class VolumeManagerImplTest { conf.set(Property.INSTANCE_VOLUMES, viewfs://dummy); VolumeManagerImpl.get(conf); } + + public static class WrongVolumeChooser implements VolumeChooser { +@Override +public String choose(String[] options) { + return file://totally-not-given/; +} + } + + @SuppressWarnings(deprecation) + private static final Property INSTANCE_DFS_URI = Property.INSTANCE_DFS_URI; + + @Test + public void chooseFromOptions() throws Exception { +ListString volumes = Arrays.asList(file://one/, file://two/, file://three/); +ConfigurationCopy conf = new ConfigurationCopy(); +conf.set(INSTANCE_DFS_URI, volumes.get(0)); +conf.set(Property.INSTANCE_VOLUMES, StringUtils.join(volumes,,)); +conf.set(Property.GENERAL_VOLUME_CHOOSER, WrongVolumeChooser.class.getName()); +VolumeManager vm
[3/3] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b1dc56ec Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b1dc56ec Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b1dc56ec Branch: refs/heads/master Commit: b1dc56ec26c0e6d4492b2a83ad818fb03f106ddb Parents: dadb7bb 86f7c1b Author: Christopher Tubbs ctubb...@apache.org Authored: Mon Dec 15 14:45:06 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Mon Dec 15 14:45:06 2014 -0500 -- --
[3/3] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0c63731d Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0c63731d Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0c63731d Branch: refs/heads/master Commit: 0c63731dafcf07cd496272c1dcfec2488360f8db Parents: 8260914 76e7fff Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 17 21:10:32 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 17 21:10:32 2014 -0500 -- --
[2/3] accumulo git commit: ACCUMULO-3228 Remove additional resource leak warnings
ACCUMULO-3228 Remove additional resource leak warnings Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76e7fffc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76e7fffc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76e7fffc Branch: refs/heads/master Commit: 76e7fffc6e8f28118b619c303908fd31ccc5a1c1 Parents: 27d4ee2 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 17 20:24:11 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 17 21:08:00 2014 -0500 -- .../core/client/mapreduce/lib/impl/ConfiguratorBase.java | 1 + .../accumulo/core/util/shell/commands/AddSplitsCommand.java | 2 ++ .../java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java | 1 + .../accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 4 +--- .../accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java | 3 +-- 5 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java index da83386..a928e26 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java +++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java @@ -266,6 +266,7 @@ public class ConfiguratorBase { while (fileScanner.hasNextLine()) { Credentials creds = Credentials.deserialize(fileScanner.nextLine()); if (principal.equals(creds.getPrincipal())) { + fileScanner.close(); return creds.getToken(); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java index 90a3548..40043a2 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java +++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java @@ -34,6 +34,7 @@ import org.apache.hadoop.io.Text; public class AddSplitsCommand extends Command { private Option optSplitsFile, base64Opt; + @Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception { final String tableName = OptUtil.getTableOpt(cl, shellState); final boolean decode = cl.hasOption(base64Opt.getOpt()); @@ -51,6 +52,7 @@ public class AddSplitsCommand extends Command { splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new Text(line)); } } + file.close(); } else { if (cl.getArgList().isEmpty()) { throw new MissingArgumentException(No split points specified); http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java index 22eca84..1e6c4c5 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java @@ -209,6 +209,7 @@ public class MiniAccumuloRunner { // start a socket on the shutdown port and block- anything connected to this port will activate the shutdown ServerSocket shutdownServer = new ServerSocket(shutdownPort); shutdownServer.accept().close(); +shutdownServer.close(); System.exit(0); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index 19d7746..4692954 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java +++
[1/3] accumulo git commit: ACCUMULO-3228 Remove additional resource leak warnings
Repository: accumulo Updated Branches: refs/heads/1.6 27d4ee212 - 76e7fffc6 refs/heads/master 826091460 - 0c63731da ACCUMULO-3228 Remove additional resource leak warnings Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/76e7fffc Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/76e7fffc Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/76e7fffc Branch: refs/heads/1.6 Commit: 76e7fffc6e8f28118b619c303908fd31ccc5a1c1 Parents: 27d4ee2 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 17 20:24:11 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 17 21:08:00 2014 -0500 -- .../core/client/mapreduce/lib/impl/ConfiguratorBase.java | 1 + .../accumulo/core/util/shell/commands/AddSplitsCommand.java | 2 ++ .../java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java | 1 + .../accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 4 +--- .../accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java | 3 +-- 5 files changed, 6 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java index da83386..a928e26 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java +++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/ConfiguratorBase.java @@ -266,6 +266,7 @@ public class ConfiguratorBase { while (fileScanner.hasNextLine()) { Credentials creds = Credentials.deserialize(fileScanner.nextLine()); if (principal.equals(creds.getPrincipal())) { + fileScanner.close(); return creds.getToken(); } } http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java index 90a3548..40043a2 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java +++ b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/AddSplitsCommand.java @@ -34,6 +34,7 @@ import org.apache.hadoop.io.Text; public class AddSplitsCommand extends Command { private Option optSplitsFile, base64Opt; + @Override public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception { final String tableName = OptUtil.getTableOpt(cl, shellState); final boolean decode = cl.hasOption(base64Opt.getOpt()); @@ -51,6 +52,7 @@ public class AddSplitsCommand extends Command { splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new Text(line)); } } + file.close(); } else { if (cl.getArgList().isEmpty()) { throw new MissingArgumentException(No split points specified); http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java index 22eca84..1e6c4c5 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java @@ -209,6 +209,7 @@ public class MiniAccumuloRunner { // start a socket on the shutdown port and block- anything connected to this port will activate the shutdown ServerSocket shutdownServer = new ServerSocket(shutdownPort); shutdownServer.accept().close(); +shutdownServer.close(); System.exit(0); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/76e7fffc/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index
accumulo git commit: ACCUMULO-3425 Cleanup javadoc warnings
Repository: accumulo Updated Branches: refs/heads/master 0c63731da - d1af19d50 ACCUMULO-3425 Cleanup javadoc warnings Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d1af19d5 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d1af19d5 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d1af19d5 Branch: refs/heads/master Commit: d1af19d5049829a1e93ca34e862bece86b84cf3e Parents: 0c63731 Author: Christopher Tubbs ctubb...@apache.org Authored: Wed Dec 17 21:17:48 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Wed Dec 17 21:17:48 2014 -0500 -- .../main/java/org/apache/accumulo/core/rpc/ThriftUtil.java| 2 +- .../org/apache/accumulo/core/rpc/TraceProtocolFactory.java| 4 ++-- .../java/org/apache/accumulo/server/rpc/TServerUtils.java | 7 ++- 3 files changed, 5 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d1af19d5/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java index 8b8304c..09bd6c4 100644 --- a/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java +++ b/core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java @@ -71,7 +71,7 @@ public class ThriftUtil { } /** - * An instance of {@link TFramedTransport.Factory} + * An instance of {@link org.apache.thrift.transport.TFramedTransport.Factory} * * @return The default Thrift TTransportFactory for RPC */ http://git-wip-us.apache.org/repos/asf/accumulo/blob/d1af19d5/core/src/main/java/org/apache/accumulo/core/rpc/TraceProtocolFactory.java -- diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/TraceProtocolFactory.java b/core/src/main/java/org/apache/accumulo/core/rpc/TraceProtocolFactory.java index 4591aa6..4cd3ab9 100644 --- a/core/src/main/java/org/apache/accumulo/core/rpc/TraceProtocolFactory.java +++ b/core/src/main/java/org/apache/accumulo/core/rpc/TraceProtocolFactory.java @@ -21,7 +21,7 @@ import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TTransport; /** - * {@link TCompactProtocol.Factory} implementation which injects {@link TraceProtocol} instead of {@link TCompactProtocol} + * {@link org.apache.thrift.protocol.TCompactProtocol.Factory} implementation which injects {@link TraceProtocol} instead of {@link TCompactProtocol} */ public class TraceProtocolFactory extends TCompactProtocol.Factory { private static final long serialVersionUID = 1L; @@ -30,4 +30,4 @@ public class TraceProtocolFactory extends TCompactProtocol.Factory { public TProtocol getProtocol(TTransport trans) { return new TraceProtocol(trans); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/d1af19d5/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java index f9a..641c0bf 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java +++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java @@ -135,9 +135,8 @@ public class TServerUtils { port = 1024 + port % (65535 - 1024); try { HostAndPort addr = HostAndPort.fromParts(hostname, port); - return TServerUtils.startTServer(addr, timedProcessor, serverName, threadName, minThreads, - simpleTimerThreadpoolSize, timeBetweenThreadChecks, maxMessageSize, - service.getServerSslParams(), service.getClientTimeoutInMillis()); + return TServerUtils.startTServer(addr, timedProcessor, serverName, threadName, minThreads, simpleTimerThreadpoolSize, timeBetweenThreadChecks, + maxMessageSize, service.getServerSslParams(), service.getClientTimeoutInMillis()); } catch (TTransportException ex) { log.error(Unable to start TServer, ex); if (ex.getCause() == null || ex.getCause().getClass() == BindException.class) { @@ -238,7 +237,6 @@ public class TServerUtils { * @param params * SSL parameters * @return A configured TServerSocket configured to use SSL - * @throws TTransportException */ public static TServerSocket getSslServerSocket(int port, int timeout, InetAddress address, SslConnectionParams params) throws TTransportException { TServerSocket
[10/16] accumulo git commit: ACCUMULO-3172 Remove -dirty flag on releases
ACCUMULO-3172 Remove -dirty flag on releases Changes mavanagaiata plugin to stop incorrectly marking hashes as '-dirty' when using maven-release-plugin to create releases. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4bac7484 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4bac7484 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4bac7484 Branch: refs/heads/1.5 Commit: 4bac748496df2f602a821dc0605fe4e4be9a6978 Parents: 8f4bc4c Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:52:31 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:52:31 2014 -0500 -- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4bac7484/pom.xml -- diff --git a/pom.xml b/pom.xml index 835a2fa..8316a33 100644 --- a/pom.xml +++ b/pom.xml @@ -383,7 +383,7 @@ plugin groupIdcom.github.koraktor/groupId artifactIdmavanagaiata/artifactId - version0.6.1/version + version0.7.0/version configuration skipNoGittrue/skipNoGit /configuration @@ -484,7 +484,7 @@ !-- Work around MRELEASE-812 -- version2.5/version configuration -arguments-P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments +arguments-Dmavanagaiata.dirtyFlag=false -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments autoVersionSubmodulestrue/autoVersionSubmodules goalsclean compile javadoc:aggregate deploy/goals preparationGoalsclean compile javadoc:aggregate verify/preparationGoals
[02/16] accumulo git commit: ACCUMULO-2381 Remove dangerous, broken utility
ACCUMULO-2381 Remove dangerous, broken utility Removes AddFilesWithMissingEntries utility, which does not support volumes, does not properly work with the root table, assumes the list of files fit in RAM, and does not satisfy a clear recovery use case for re-integrating abandoned files into the metadata table. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/af957f9c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/af957f9c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/af957f9c Branch: refs/heads/master Commit: af957f9cc76c7df93c7a61c2dd7f6ceff0aa1f3e Parents: 76e7fff Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:16:07 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:16:07 2014 -0500 -- .../server/util/AddFilesWithMissingEntries.java | 137 --- 1 file changed, 137 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/af957f9c/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java b/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java deleted file mode 100644 index 198b2d6..000 --- a/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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.util; - -import static com.google.common.base.Charsets.UTF_8; - -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Set; - -import org.apache.accumulo.core.cli.BatchWriterOpts; -import org.apache.accumulo.core.client.MultiTableBatchWriter; -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.KeyExtent; -import org.apache.accumulo.core.data.Mutation; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.schema.MetadataSchema; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.server.ServerConstants; -import org.apache.accumulo.server.cli.ClientOpts; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileStatus; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.Text; -import org.apache.log4j.Logger; - -import com.beust.jcommander.Parameter; - -public class AddFilesWithMissingEntries { - - static final Logger log = Logger.getLogger(AddFilesWithMissingEntries.class); - - public static class Opts extends ClientOpts { -@Parameter(names = -update, description = Make changes to the + MetadataTable.NAME + table to include missing files) -boolean update = false; - } - - /** - * A utility to add files to the {@value MetadataTable#NAME} table that are not listed in the root tablet. This is a recovery tool for someone who knows what - * they are doing. It might be better to save off files, and recover your instance by re-initializing and importing the existing files. - */ - public static void main(String[] args) throws Exception { -Opts opts = new Opts(); -BatchWriterOpts bwOpts = new BatchWriterOpts(); -opts.parseArgs(AddFilesWithMissingEntries.class.getName(), args, bwOpts); - -final Scanner scanner = opts.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); -scanner.setRange(MetadataSchema.TabletsSection.getRange()); -final Configuration conf = new Configuration(); -final FileSystem fs = FileSystem.get(conf); - -KeyExtent last = new
[05/16] accumulo git commit: ACCUMULO-3126 Fix malformed package-info.java
ACCUMULO-3126 Fix malformed package-info.java Place javadoc above package declaration. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f4bc4c2 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f4bc4c2 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f4bc4c2 Branch: refs/heads/1.6 Commit: 8f4bc4c23a60ddef7eac5b20d6d08b2762931df1 Parents: c41b6dc Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:45:33 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:45:33 2014 -0500 -- .../java/org/apache/accumulo/test/stress/random/package-info.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f4bc4c2/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java index 4a489dc..488a279 100644 --- a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java +++ b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.accumulo.test.stress.random; - /** * This package contains utility classes designed to test Accumulo when large cells are being written. This is an attempt to observe the behavior Accumulo * displays when compacting and reading these cells. @@ -34,3 +32,4 @@ package org.apache.accumulo.test.stress.random; * There is no shared state intended by either of these services. This allows multiple clients to be run in parallel, either on the same host or distributed * across hosts. */ +package org.apache.accumulo.test.stress.random;
[14/16] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: core/src/main/scripts/generate-thrift.sh pom.xml Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f852e2e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f852e2e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f852e2e Branch: refs/heads/master Commit: 8f852e2efcd93304105eb15915c8f50d7fb5f49f Parents: 52a6e97 1f8b668 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:50:35 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:50:35 2014 -0500 -- pom.xml | 2 +- .../java/org/apache/accumulo/test/stress/random/package-info.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f852e2e/pom.xml -- diff --cc pom.xml index 0d3323f,8316a33..ec55ebe --- a/pom.xml +++ b/pom.xml @@@ -609,12 -484,12 +609,12 @@@ !-- Work around MRELEASE-812 -- version2.5/version configuration - arguments-P apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2/arguments -arguments-Dmavanagaiata.dirtyFlag=false -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments ++arguments-P apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2 -Dmavanagaiata.dirtyFlag=false/arguments autoVersionSubmodulestrue/autoVersionSubmodules -goalsclean compile javadoc:aggregate deploy/goals -preparationGoalsclean compile javadoc:aggregate verify/preparationGoals +goalsclean deploy/goals +preparationGoalsclean verify/preparationGoals tagNameFormat@{project.version}/tagNameFormat -releaseProfilesseal-jars/releaseProfiles +releaseProfilesseal-jars,skip-findbugs/releaseProfiles useReleaseProfilefalse/useReleaseProfile pushChangesfalse/pushChanges localCheckouttrue/localCheckout
[07/16] accumulo git commit: ACCUMULO-3126 Fix malformed package-info.java
ACCUMULO-3126 Fix malformed package-info.java Place javadoc above package declaration. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f4bc4c2 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f4bc4c2 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f4bc4c2 Branch: refs/heads/1.5 Commit: 8f4bc4c23a60ddef7eac5b20d6d08b2762931df1 Parents: c41b6dc Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:45:33 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:45:33 2014 -0500 -- .../java/org/apache/accumulo/test/stress/random/package-info.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f4bc4c2/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java index 4a489dc..488a279 100644 --- a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java +++ b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.accumulo.test.stress.random; - /** * This package contains utility classes designed to test Accumulo when large cells are being written. This is an attempt to observe the behavior Accumulo * displays when compacting and reading these cells. @@ -34,3 +32,4 @@ package org.apache.accumulo.test.stress.random; * There is no shared state intended by either of these services. This allows multiple clients to be run in parallel, either on the same host or distributed * across hosts. */ +package org.apache.accumulo.test.stress.random;
[13/16] accumulo git commit: ACCUMULO-3437 Stricter thrift version checking
ACCUMULO-3437 Stricter thrift version checking Make Accumulo 1.5.x explicitly check for Thrift 0.9.0, not just 0.9. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1f8b668f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1f8b668f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1f8b668f Branch: refs/heads/1.5 Commit: 1f8b668f0904c091aafaef57bc6c818ae3acf201 Parents: 4bac748 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:02:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:02:13 2014 -0500 -- core/src/main/scripts/generate-thrift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1f8b668f/core/src/main/scripts/generate-thrift.sh -- diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh index 5a5d69f..64fe794 100755 --- a/core/src/main/scripts/generate-thrift.sh +++ b/core/src/main/scripts/generate-thrift.sh @@ -26,7 +26,7 @@ # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules # -[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9' +[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9.0' [ -z $INCLUDED_MODULES ] INCLUDED_MODULES=(../trace) [ -z $BASE_OUTPUT_PACKAGE ] BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' [ -z $PACKAGES_TO_GENERATE ] PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data)
[04/16] accumulo git commit: ACCUMULO-3352 Propagate bulk import errors to client
ACCUMULO-3352 Propagate bulk import errors to client Provide a better message in case of failures in bulk import, and propagate those errors to the client, rather than swallow them on the server side, and forcing the client to wait indefinitely. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/52a6e977 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52a6e977 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52a6e977 Branch: refs/heads/1.6 Commit: 52a6e977fa4f4fe89e90a0f0b44dc04ef9024bb0 Parents: af957f9 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:32:49 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:32:49 2014 -0500 -- .../java/org/apache/accumulo/master/tableOps/BulkImport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/52a6e977/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java index 10cf224..9f41920 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java @@ -189,11 +189,11 @@ public class BulkImport extends MasterRepo { private Path createNewBulkDir(VolumeManager fs, String tableId) throws IOException { Path tempPath = fs.matchingFileSystem(new Path(sourceDir), ServerConstants.getTablesDirs()); if (tempPath == null) - throw new IllegalStateException(sourceDir + is not in a known namespace); + throw new IOException(sourceDir + is not in a volume configured for Accumulo); String tableDir = tempPath.toString(); if (tableDir == null) - throw new IllegalStateException(sourceDir + is not in a known namespace); + throw new IOException(sourceDir + is not in a volume configured for Accumulo); Path directory = new Path(tableDir + / + tableId); fs.mkdirs(directory); @@ -208,7 +208,7 @@ public class BulkImport extends MasterRepo { while (true) { Path newBulkDir = new Path(directory, Constants.BULK_PREFIX + namer.getNextName()); if (fs.exists(newBulkDir)) // sanity check -throw new IllegalStateException(Dir exist when it should not + newBulkDir); +throw new IOException(Dir exist when it should not + newBulkDir); if (fs.mkdirs(newBulkDir)) return newBulkDir; log.warn(Failed to create + newBulkDir + for unknown reason);
[16/16] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Conflicts: server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/aa73e7f4 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/aa73e7f4 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/aa73e7f4 Branch: refs/heads/master Commit: aa73e7f45c0931d9f350e096170874ac01c9c26a Parents: d1af19d 8f852e2 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:52:46 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:52:46 2014 -0500 -- pom.xml | 2 +- .../server/util/AddFilesWithMissingEntries.java | 137 --- .../accumulo/master/tableOps/BulkImport.java| 6 +- .../test/stress/random/package-info.java| 3 +- 4 files changed, 5 insertions(+), 143 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa73e7f4/pom.xml -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa73e7f4/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java --
[12/16] accumulo git commit: ACCUMULO-3437 Stricter thrift version checking
ACCUMULO-3437 Stricter thrift version checking Make Accumulo 1.5.x explicitly check for Thrift 0.9.0, not just 0.9. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1f8b668f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1f8b668f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1f8b668f Branch: refs/heads/1.6 Commit: 1f8b668f0904c091aafaef57bc6c818ae3acf201 Parents: 4bac748 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:02:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:02:13 2014 -0500 -- core/src/main/scripts/generate-thrift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1f8b668f/core/src/main/scripts/generate-thrift.sh -- diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh index 5a5d69f..64fe794 100755 --- a/core/src/main/scripts/generate-thrift.sh +++ b/core/src/main/scripts/generate-thrift.sh @@ -26,7 +26,7 @@ # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules # -[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9' +[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9.0' [ -z $INCLUDED_MODULES ] INCLUDED_MODULES=(../trace) [ -z $BASE_OUTPUT_PACKAGE ] BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' [ -z $PACKAGES_TO_GENERATE ] PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data)
[11/16] accumulo git commit: ACCUMULO-3437 Stricter thrift version checking
ACCUMULO-3437 Stricter thrift version checking Make Accumulo 1.5.x explicitly check for Thrift 0.9.0, not just 0.9. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1f8b668f Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1f8b668f Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1f8b668f Branch: refs/heads/master Commit: 1f8b668f0904c091aafaef57bc6c818ae3acf201 Parents: 4bac748 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:02:13 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:02:13 2014 -0500 -- core/src/main/scripts/generate-thrift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1f8b668f/core/src/main/scripts/generate-thrift.sh -- diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh index 5a5d69f..64fe794 100755 --- a/core/src/main/scripts/generate-thrift.sh +++ b/core/src/main/scripts/generate-thrift.sh @@ -26,7 +26,7 @@ # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules # -[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9' +[ -z $REQUIRED_THRIFT_VERSION ] REQUIRED_THRIFT_VERSION='0.9.0' [ -z $INCLUDED_MODULES ] INCLUDED_MODULES=(../trace) [ -z $BASE_OUTPUT_PACKAGE ] BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' [ -z $PACKAGES_TO_GENERATE ] PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data)
[03/16] accumulo git commit: ACCUMULO-3352 Propagate bulk import errors to client
ACCUMULO-3352 Propagate bulk import errors to client Provide a better message in case of failures in bulk import, and propagate those errors to the client, rather than swallow them on the server side, and forcing the client to wait indefinitely. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/52a6e977 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/52a6e977 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/52a6e977 Branch: refs/heads/master Commit: 52a6e977fa4f4fe89e90a0f0b44dc04ef9024bb0 Parents: af957f9 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:32:49 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:32:49 2014 -0500 -- .../java/org/apache/accumulo/master/tableOps/BulkImport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/52a6e977/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java -- diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java index 10cf224..9f41920 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java +++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java @@ -189,11 +189,11 @@ public class BulkImport extends MasterRepo { private Path createNewBulkDir(VolumeManager fs, String tableId) throws IOException { Path tempPath = fs.matchingFileSystem(new Path(sourceDir), ServerConstants.getTablesDirs()); if (tempPath == null) - throw new IllegalStateException(sourceDir + is not in a known namespace); + throw new IOException(sourceDir + is not in a volume configured for Accumulo); String tableDir = tempPath.toString(); if (tableDir == null) - throw new IllegalStateException(sourceDir + is not in a known namespace); + throw new IOException(sourceDir + is not in a volume configured for Accumulo); Path directory = new Path(tableDir + / + tableId); fs.mkdirs(directory); @@ -208,7 +208,7 @@ public class BulkImport extends MasterRepo { while (true) { Path newBulkDir = new Path(directory, Constants.BULK_PREFIX + namer.getNextName()); if (fs.exists(newBulkDir)) // sanity check -throw new IllegalStateException(Dir exist when it should not + newBulkDir); +throw new IOException(Dir exist when it should not + newBulkDir); if (fs.mkdirs(newBulkDir)) return newBulkDir; log.warn(Failed to create + newBulkDir + for unknown reason);
[15/16] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: core/src/main/scripts/generate-thrift.sh pom.xml Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f852e2e Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f852e2e Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f852e2e Branch: refs/heads/1.6 Commit: 8f852e2efcd93304105eb15915c8f50d7fb5f49f Parents: 52a6e97 1f8b668 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 15:50:35 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 15:50:35 2014 -0500 -- pom.xml | 2 +- .../java/org/apache/accumulo/test/stress/random/package-info.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f852e2e/pom.xml -- diff --cc pom.xml index 0d3323f,8316a33..ec55ebe --- a/pom.xml +++ b/pom.xml @@@ -609,12 -484,12 +609,12 @@@ !-- Work around MRELEASE-812 -- version2.5/version configuration - arguments-P apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2/arguments -arguments-Dmavanagaiata.dirtyFlag=false -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments ++arguments-P apache-release,thrift,assemble,docs,sunny -Dtimeout.factor=2 -Dmavanagaiata.dirtyFlag=false/arguments autoVersionSubmodulestrue/autoVersionSubmodules -goalsclean compile javadoc:aggregate deploy/goals -preparationGoalsclean compile javadoc:aggregate verify/preparationGoals +goalsclean deploy/goals +preparationGoalsclean verify/preparationGoals tagNameFormat@{project.version}/tagNameFormat -releaseProfilesseal-jars/releaseProfiles +releaseProfilesseal-jars,skip-findbugs/releaseProfiles useReleaseProfilefalse/useReleaseProfile pushChangesfalse/pushChanges localCheckouttrue/localCheckout
[01/16] accumulo git commit: ACCUMULO-2381 Remove dangerous, broken utility
Repository: accumulo Updated Branches: refs/heads/1.5 c41b6dc05 - 1f8b668f0 refs/heads/1.6 76e7fffc6 - 8f852e2ef refs/heads/master d1af19d50 - aa73e7f45 ACCUMULO-2381 Remove dangerous, broken utility Removes AddFilesWithMissingEntries utility, which does not support volumes, does not properly work with the root table, assumes the list of files fit in RAM, and does not satisfy a clear recovery use case for re-integrating abandoned files into the metadata table. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/af957f9c Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/af957f9c Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/af957f9c Branch: refs/heads/1.6 Commit: af957f9cc76c7df93c7a61c2dd7f6ceff0aa1f3e Parents: 76e7fff Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:16:07 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:16:07 2014 -0500 -- .../server/util/AddFilesWithMissingEntries.java | 137 --- 1 file changed, 137 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/af957f9c/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java -- diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java b/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java deleted file mode 100644 index 198b2d6..000 --- a/server/base/src/main/java/org/apache/accumulo/server/util/AddFilesWithMissingEntries.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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.util; - -import static com.google.common.base.Charsets.UTF_8; - -import java.util.HashSet; -import java.util.Map.Entry; -import java.util.Set; - -import org.apache.accumulo.core.cli.BatchWriterOpts; -import org.apache.accumulo.core.client.MultiTableBatchWriter; -import org.apache.accumulo.core.client.Scanner; -import org.apache.accumulo.core.data.Key; -import org.apache.accumulo.core.data.KeyExtent; -import org.apache.accumulo.core.data.Mutation; -import org.apache.accumulo.core.data.Value; -import org.apache.accumulo.core.metadata.MetadataTable; -import org.apache.accumulo.core.metadata.schema.MetadataSchema; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; -import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.DataFileColumnFamily; -import org.apache.accumulo.core.security.Authorizations; -import org.apache.accumulo.server.ServerConstants; -import org.apache.accumulo.server.cli.ClientOpts; -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileStatus; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.io.Text; -import org.apache.log4j.Logger; - -import com.beust.jcommander.Parameter; - -public class AddFilesWithMissingEntries { - - static final Logger log = Logger.getLogger(AddFilesWithMissingEntries.class); - - public static class Opts extends ClientOpts { -@Parameter(names = -update, description = Make changes to the + MetadataTable.NAME + table to include missing files) -boolean update = false; - } - - /** - * A utility to add files to the {@value MetadataTable#NAME} table that are not listed in the root tablet. This is a recovery tool for someone who knows what - * they are doing. It might be better to save off files, and recover your instance by re-initializing and importing the existing files. - */ - public static void main(String[] args) throws Exception { -Opts opts = new Opts(); -BatchWriterOpts bwOpts = new BatchWriterOpts(); -opts.parseArgs(AddFilesWithMissingEntries.class.getName(), args, bwOpts); - -final Scanner scanner = opts.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); -
[09/16] accumulo git commit: ACCUMULO-3172 Remove -dirty flag on releases
ACCUMULO-3172 Remove -dirty flag on releases Changes mavanagaiata plugin to stop incorrectly marking hashes as '-dirty' when using maven-release-plugin to create releases. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4bac7484 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4bac7484 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4bac7484 Branch: refs/heads/1.6 Commit: 4bac748496df2f602a821dc0605fe4e4be9a6978 Parents: 8f4bc4c Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:52:31 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:52:31 2014 -0500 -- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4bac7484/pom.xml -- diff --git a/pom.xml b/pom.xml index 835a2fa..8316a33 100644 --- a/pom.xml +++ b/pom.xml @@ -383,7 +383,7 @@ plugin groupIdcom.github.koraktor/groupId artifactIdmavanagaiata/artifactId - version0.6.1/version + version0.7.0/version configuration skipNoGittrue/skipNoGit /configuration @@ -484,7 +484,7 @@ !-- Work around MRELEASE-812 -- version2.5/version configuration -arguments-P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments +arguments-Dmavanagaiata.dirtyFlag=false -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments autoVersionSubmodulestrue/autoVersionSubmodules goalsclean compile javadoc:aggregate deploy/goals preparationGoalsclean compile javadoc:aggregate verify/preparationGoals
[08/16] accumulo git commit: ACCUMULO-3172 Remove -dirty flag on releases
ACCUMULO-3172 Remove -dirty flag on releases Changes mavanagaiata plugin to stop incorrectly marking hashes as '-dirty' when using maven-release-plugin to create releases. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/4bac7484 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/4bac7484 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/4bac7484 Branch: refs/heads/master Commit: 4bac748496df2f602a821dc0605fe4e4be9a6978 Parents: 8f4bc4c Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:52:31 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:52:31 2014 -0500 -- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/4bac7484/pom.xml -- diff --git a/pom.xml b/pom.xml index 835a2fa..8316a33 100644 --- a/pom.xml +++ b/pom.xml @@ -383,7 +383,7 @@ plugin groupIdcom.github.koraktor/groupId artifactIdmavanagaiata/artifactId - version0.6.1/version + version0.7.0/version configuration skipNoGittrue/skipNoGit /configuration @@ -484,7 +484,7 @@ !-- Work around MRELEASE-812 -- version2.5/version configuration -arguments-P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments +arguments-Dmavanagaiata.dirtyFlag=false -P apache-release,check-licenses,thrift,native,assemble,docs,rpm,deb/arguments autoVersionSubmodulestrue/autoVersionSubmodules goalsclean compile javadoc:aggregate deploy/goals preparationGoalsclean compile javadoc:aggregate verify/preparationGoals
[06/16] accumulo git commit: ACCUMULO-3126 Fix malformed package-info.java
ACCUMULO-3126 Fix malformed package-info.java Place javadoc above package declaration. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f4bc4c2 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f4bc4c2 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f4bc4c2 Branch: refs/heads/master Commit: 8f4bc4c23a60ddef7eac5b20d6d08b2762931df1 Parents: c41b6dc Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 14:45:33 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 14:45:33 2014 -0500 -- .../java/org/apache/accumulo/test/stress/random/package-info.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f4bc4c2/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java -- diff --git a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java index 4a489dc..488a279 100644 --- a/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java +++ b/test/src/main/java/org/apache/accumulo/test/stress/random/package-info.java @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.accumulo.test.stress.random; - /** * This package contains utility classes designed to test Accumulo when large cells are being written. This is an attempt to observe the behavior Accumulo * displays when compacting and reading these cells. @@ -34,3 +32,4 @@ package org.apache.accumulo.test.stress.random; * There is no shared state intended by either of these services. This allows multiple clients to be run in parallel, either on the same host or distributed * across hosts. */ +package org.apache.accumulo.test.stress.random;
[6/7] accumulo git commit: ACCUMULO-3383 Remove unused import
ACCUMULO-3383 Remove unused import Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d2aeb5ef Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d2aeb5ef Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d2aeb5ef Branch: refs/heads/1.6 Commit: d2aeb5ef2443d3f320906f6d3fd99f60b5bd9d8a Parents: 97f16db Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 16:50:30 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:50:30 2014 -0500 -- .../accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d2aeb5ef/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -- diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java index bd1f943..5d6f002 100644 --- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java +++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java @@ -25,7 +25,6 @@ import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; import org.apache.accumulo.start.classloader.AccumuloClassLoader; import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject;
[4/7] accumulo git commit: ACCUMULO-3383 Fix for AccumuloVFSClassloader conflicting cache directories
ACCUMULO-3383 Fix for AccumuloVFSClassloader conflicting cache directories . AccumuloVFSClassloader no longer creates conflicting local cache directory names when vfs.cache.dir property is set. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/97f16db4 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/97f16db4 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/97f16db4 Branch: refs/heads/1.6 Commit: 97f16db4d31db63b46985da07228b89f0c346270 Parents: e572d56 Author: Drew Farris d...@apache.org Authored: Sat Dec 13 23:36:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:47:32 2014 -0500 -- .../classloader/vfs/AccumuloVFSClassLoader.java | 8 +- .../vfs/AccumuloVFSClassLoaderTest.java | 80 2 files changed, 82 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/97f16db4/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -- diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java index 983ad7c..bd1f943 100644 --- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java +++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java @@ -92,8 +92,6 @@ public class AccumuloVFSClassLoader { public static final String VFS_CACHE_DIR = general.vfs.cache.dir; - public static final AtomicInteger uniqueDirectoryGenerator = new AtomicInteger(0); - private static ClassLoader parent = null; private static volatile ReloadingClassLoader loader = null; private static final Object lock = new Object(); @@ -279,10 +277,7 @@ public class AccumuloVFSClassLoader { vfs.addMimeTypeMap(application/zip, zip); vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory()); vfs.setFilesCache(new SoftRefFilesCache()); -String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, ); File cacheDir = computeTopCacheDir(); -if (!cacheDirPath.isEmpty()) - cacheDir = new File(cacheDirPath, + uniqueDirectoryGenerator.getAndIncrement()); vfs.setReplicator(new UniqueFileReplicator(cacheDir)); vfs.setCacheStrategy(CacheStrategy.ON_RESOLVE); vfs.init(); @@ -291,8 +286,9 @@ public class AccumuloVFSClassLoader { } private static File computeTopCacheDir() { +String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, System.getProperty(java.io.tmpdir)); String procName = ManagementFactory.getRuntimeMXBean().getName(); -return new File(System.getProperty(java.io.tmpdir), accumulo-vfs-cache- + procName + - + System.getProperty(user.name, nouser)); +return new File(cacheDirPath, accumulo-vfs-cache- + procName + - + System.getProperty(user.name, nouser)); } public interface Printer { http://git-wip-us.apache.org/repos/asf/accumulo/blob/97f16db4/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java -- diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java index e7c369e..522c870 100644 --- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java +++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java @@ -23,6 +23,7 @@ import java.net.URLClassLoader; import org.apache.accumulo.start.classloader.AccumuloClassLoader; import org.apache.commons.io.FileUtils; +import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.impl.VFSClassLoader; import org.junit.After; import org.junit.Assert; @@ -126,4 +127,83 @@ public class AccumuloVFSClassLoaderTest { Whitebox.setInternalState(AccumuloVFSClassLoader.class, loader, (AccumuloReloadingVFSClassLoader) null); } + @Test + public void testDefaultCacheDirectory() throws Exception { + +Whitebox.setInternalState(AccumuloVFSClassLoader.class, loader, (AccumuloReloadingVFSClassLoader) null); + +File conf = folder1.newFile(accumulo-site.xml); +FileWriter out = new FileWriter(conf); +out.append(?xml version=\1.0\ encoding=\UTF-8\?\n); +out.append(configuration\n); +out.append(property\n); +out.append(namegeneral.classpaths/name\n); +out.append(value/value\n); +out.append(/property\n); +out.append(property\n); +
[5/7] accumulo git commit: ACCUMULO-3383 Remove unused import
ACCUMULO-3383 Remove unused import Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d2aeb5ef Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d2aeb5ef Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d2aeb5ef Branch: refs/heads/master Commit: d2aeb5ef2443d3f320906f6d3fd99f60b5bd9d8a Parents: 97f16db Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 16:50:30 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:50:30 2014 -0500 -- .../accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d2aeb5ef/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -- diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java index bd1f943..5d6f002 100644 --- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java +++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java @@ -25,7 +25,6 @@ import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; import org.apache.accumulo.start.classloader.AccumuloClassLoader; import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject;
[2/7] accumulo git commit: ACCUMULO-3265 Add bootstrap_config.sh to README
ACCUMULO-3265 Add bootstrap_config.sh to README Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e572d56b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e572d56b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e572d56b Branch: refs/heads/master Commit: e572d56ba5437410be5d1936e8f1d7c2fcf792ab Parents: 8f852e2 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 16:44:16 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:44:16 2014 -0500 -- README | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e572d56b/README -- diff --git a/README b/README index b44c45f..39ef45a 100644 --- a/README +++ b/README @@ -232,11 +232,21 @@ Additionally, it is strongly recommended that you enable 'dfs.datanode.synconclo file to ensure that, in the face of unexpected power loss to a datanode, files are wholly synced to disk. -The example accumulo configuration files are placed in directories based on the -memory footprint for the accumulo processes. If you are using native libraries -for you tablet server in-memory map, then you can use the files in native-standalone. -If you get warnings about not being able to load the native libraries, you can -use the configuration files in standalone. +Accumulo's own configuration files can be bootstrapped with the +$ACCUMULO_HOME/bin/bootstrap_config.sh script. This script will allow you to +select options which correspond closely to your particular environment. The +configuration files produced by this script are examples. You should always +inspect any configuration files you use to ensure they are appropriate for your +environment, and to tailor them to your needs, as they are not guaranteed to be +suitable for all users and all environments. + +Some example accumulo configuration files are placed in directories based on the +memory footprint for the accumulo processes. These are pre-generated from +particular selections from the bootstrap_config.sh script for your convenience. +If you are using native libraries for you tablet server in-memory map, then you +can use the files in native-standalone. If you get warnings about not being +able to load the native libraries, you can use the configuration files in +standalone. For testing on a single computer, use a fairly small configuration:
[1/7] accumulo git commit: ACCUMULO-3265 Add bootstrap_config.sh to README
Repository: accumulo Updated Branches: refs/heads/1.6 8f852e2ef - d2aeb5ef2 refs/heads/master aa73e7f45 - 79c0a5eac ACCUMULO-3265 Add bootstrap_config.sh to README Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e572d56b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e572d56b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e572d56b Branch: refs/heads/1.6 Commit: e572d56ba5437410be5d1936e8f1d7c2fcf792ab Parents: 8f852e2 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 16:44:16 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:44:16 2014 -0500 -- README | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e572d56b/README -- diff --git a/README b/README index b44c45f..39ef45a 100644 --- a/README +++ b/README @@ -232,11 +232,21 @@ Additionally, it is strongly recommended that you enable 'dfs.datanode.synconclo file to ensure that, in the face of unexpected power loss to a datanode, files are wholly synced to disk. -The example accumulo configuration files are placed in directories based on the -memory footprint for the accumulo processes. If you are using native libraries -for you tablet server in-memory map, then you can use the files in native-standalone. -If you get warnings about not being able to load the native libraries, you can -use the configuration files in standalone. +Accumulo's own configuration files can be bootstrapped with the +$ACCUMULO_HOME/bin/bootstrap_config.sh script. This script will allow you to +select options which correspond closely to your particular environment. The +configuration files produced by this script are examples. You should always +inspect any configuration files you use to ensure they are appropriate for your +environment, and to tailor them to your needs, as they are not guaranteed to be +suitable for all users and all environments. + +Some example accumulo configuration files are placed in directories based on the +memory footprint for the accumulo processes. These are pre-generated from +particular selections from the bootstrap_config.sh script for your convenience. +If you are using native libraries for you tablet server in-memory map, then you +can use the files in native-standalone. If you get warnings about not being +able to load the native libraries, you can use the configuration files in +standalone. For testing on a single computer, use a fairly small configuration:
[7/7] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/79c0a5ea Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/79c0a5ea Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/79c0a5ea Branch: refs/heads/master Commit: 79c0a5eacb47fb6ba1223bc931619c9d498dd2d1 Parents: aa73e7f d2aeb5e Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 16:53:38 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:53:38 2014 -0500 -- README | 20 +++-- .../classloader/vfs/AccumuloVFSClassLoader.java | 9 +-- .../vfs/AccumuloVFSClassLoaderTest.java | 80 3 files changed, 97 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/79c0a5ea/README -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/79c0a5ea/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java --
[3/7] accumulo git commit: ACCUMULO-3383 Fix for AccumuloVFSClassloader conflicting cache directories
ACCUMULO-3383 Fix for AccumuloVFSClassloader conflicting cache directories . AccumuloVFSClassloader no longer creates conflicting local cache directory names when vfs.cache.dir property is set. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/97f16db4 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/97f16db4 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/97f16db4 Branch: refs/heads/master Commit: 97f16db4d31db63b46985da07228b89f0c346270 Parents: e572d56 Author: Drew Farris d...@apache.org Authored: Sat Dec 13 23:36:24 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 16:47:32 2014 -0500 -- .../classloader/vfs/AccumuloVFSClassLoader.java | 8 +- .../vfs/AccumuloVFSClassLoaderTest.java | 80 2 files changed, 82 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/97f16db4/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -- diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java index 983ad7c..bd1f943 100644 --- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java +++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java @@ -92,8 +92,6 @@ public class AccumuloVFSClassLoader { public static final String VFS_CACHE_DIR = general.vfs.cache.dir; - public static final AtomicInteger uniqueDirectoryGenerator = new AtomicInteger(0); - private static ClassLoader parent = null; private static volatile ReloadingClassLoader loader = null; private static final Object lock = new Object(); @@ -279,10 +277,7 @@ public class AccumuloVFSClassLoader { vfs.addMimeTypeMap(application/zip, zip); vfs.setFileContentInfoFactory(new FileContentInfoFilenameFactory()); vfs.setFilesCache(new SoftRefFilesCache()); -String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, ); File cacheDir = computeTopCacheDir(); -if (!cacheDirPath.isEmpty()) - cacheDir = new File(cacheDirPath, + uniqueDirectoryGenerator.getAndIncrement()); vfs.setReplicator(new UniqueFileReplicator(cacheDir)); vfs.setCacheStrategy(CacheStrategy.ON_RESOLVE); vfs.init(); @@ -291,8 +286,9 @@ public class AccumuloVFSClassLoader { } private static File computeTopCacheDir() { +String cacheDirPath = AccumuloClassLoader.getAccumuloString(VFS_CACHE_DIR, System.getProperty(java.io.tmpdir)); String procName = ManagementFactory.getRuntimeMXBean().getName(); -return new File(System.getProperty(java.io.tmpdir), accumulo-vfs-cache- + procName + - + System.getProperty(user.name, nouser)); +return new File(cacheDirPath, accumulo-vfs-cache- + procName + - + System.getProperty(user.name, nouser)); } public interface Printer { http://git-wip-us.apache.org/repos/asf/accumulo/blob/97f16db4/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java -- diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java index e7c369e..522c870 100644 --- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java +++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java @@ -23,6 +23,7 @@ import java.net.URLClassLoader; import org.apache.accumulo.start.classloader.AccumuloClassLoader; import org.apache.commons.io.FileUtils; +import org.apache.commons.vfs2.impl.DefaultFileSystemManager; import org.apache.commons.vfs2.impl.VFSClassLoader; import org.junit.After; import org.junit.Assert; @@ -126,4 +127,83 @@ public class AccumuloVFSClassLoaderTest { Whitebox.setInternalState(AccumuloVFSClassLoader.class, loader, (AccumuloReloadingVFSClassLoader) null); } + @Test + public void testDefaultCacheDirectory() throws Exception { + +Whitebox.setInternalState(AccumuloVFSClassLoader.class, loader, (AccumuloReloadingVFSClassLoader) null); + +File conf = folder1.newFile(accumulo-site.xml); +FileWriter out = new FileWriter(conf); +out.append(?xml version=\1.0\ encoding=\UTF-8\?\n); +out.append(configuration\n); +out.append(property\n); +out.append(namegeneral.classpaths/name\n); +out.append(value/value\n); +out.append(/property\n); +out.append(property\n); +
[5/9] accumulo git commit: ACCUMULO-3291 Use target instead of /tmp
ACCUMULO-3291 Use target instead of /tmp Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0398fa70 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0398fa70 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0398fa70 Branch: refs/heads/1.6 Commit: 0398fa70be7758279c61735435be4c67f96bb104 Parents: 6d8c8c7 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:24:18 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:24:18 2014 -0500 -- .../MiniAccumuloClusterStartStopTest.java | 38 +++- 1 file changed, 21 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0398fa70/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java -- diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java index f7440e8..a92342e 100644 --- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java +++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java @@ -16,36 +16,40 @@ */ package org.apache.accumulo.minicluster; +import java.io.File; import java.io.IOException; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.ZooKeeperInstance; import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.junit.After; +import org.apache.commons.io.FileUtils; import org.junit.Assert; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestName; public class MiniAccumuloClusterStartStopTest { - - public TemporaryFolder folder = new TemporaryFolder(); - + + private File baseDir = new File(System.getProperty(user.dir) + /target/mini-tests/ + this.getClass().getName()); + private File testDir; + + @Rule + public TestName testName = new TestName(); + @Before public void createMacDir() throws IOException { -folder.create(); - } - - @After - public void deleteMacDir() { -folder.delete(); +baseDir.mkdirs(); +testDir = new File(baseDir, testName.getMethodName()); +FileUtils.deleteQuietly(testDir); +testDir.mkdir(); } - + @Test public void multipleStartsThrowsAnException() throws Exception { -MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret); +MiniAccumuloCluster accumulo = new MiniAccumuloCluster(testDir, superSecret); accumulo.start(); - + try { accumulo.start(); Assert.fail(Invoking start() while already started is an error); @@ -55,12 +59,12 @@ public class MiniAccumuloClusterStartStopTest { accumulo.stop(); } } - + @Test public void multipleStopsIsAllowed() throws Exception { -MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret); +MiniAccumuloCluster accumulo = new MiniAccumuloCluster(testDir, superSecret); accumulo.start(); - + Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(root, new PasswordToken(superSecret)); conn.tableOperations().create(foo);
[3/9] accumulo git commit: ACCUMULO-3340 prefer IPv4 for MAC processes
ACCUMULO-3340 prefer IPv4 for MAC processes Add system property to MiniAccumuloCluster processes: -Djava.net.preferIPv4Stack=true Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/6d8c8c71 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/6d8c8c71 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/6d8c8c71 Branch: refs/heads/master Commit: 6d8c8c71046b1cfb9163e29e6283927e50983625 Parents: 1f8b668 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:13:25 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:13:25 2014 -0500 -- .../java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/6d8c8c71/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java -- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java index 53f51f7..2907811 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java @@ -149,7 +149,7 @@ public class MiniAccumuloCluster { ArrayListString argList = new ArrayListString(); argList.addAll(Arrays.asList(javaBin, -cp, classpath, -Xmx128m, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, --Dapple.awt.UIElement=true, Main.class.getName(), className)); +-Dapple.awt.UIElement=true, -Djava.net.preferIPv4Stack=true, Main.class.getName(), className)); argList.addAll(Arrays.asList(args));
[7/9] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b8d31d73 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b8d31d73 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b8d31d73 Branch: refs/heads/1.6 Commit: b8d31d732cbd2c43c95b4b4a46abd60b3dae7f71 Parents: d2aeb5e 0398fa7 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:44:49 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:44:49 2014 -0500 -- .../impl/MiniAccumuloClusterImpl.java | 4 +-- .../MiniAccumuloClusterStartStopTest.java | 26 +++- 2 files changed, 17 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b8d31d73/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index 4692954,000..8188be7 mode 100644,00..100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java @@@ -1,777 -1,0 +1,777 @@@ +/* + * 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.minicluster.impl; + +import static com.google.common.base.Charsets.UTF_8; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileFilter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import org.apache.accumulo.cluster.AccumuloCluster; +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.ClientConfiguration; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.ConfigurationCopy; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterGoalState; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.StringUtil; +import
[8/9] accumulo git commit: Merge branch '1.5' into 1.6
Merge branch '1.5' into 1.6 Conflicts: minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/b8d31d73 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/b8d31d73 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/b8d31d73 Branch: refs/heads/master Commit: b8d31d732cbd2c43c95b4b4a46abd60b3dae7f71 Parents: d2aeb5e 0398fa7 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:44:49 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:44:49 2014 -0500 -- .../impl/MiniAccumuloClusterImpl.java | 4 +-- .../MiniAccumuloClusterStartStopTest.java | 26 +++- 2 files changed, 17 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/b8d31d73/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -- diff --cc minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java index 4692954,000..8188be7 mode 100644,00..100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java @@@ -1,777 -1,0 +1,777 @@@ +/* + * 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.minicluster.impl; + +import static com.google.common.base.Charsets.UTF_8; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileFilter; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Properties; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +import org.apache.accumulo.cluster.AccumuloCluster; +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.client.AccumuloException; +import org.apache.accumulo.core.client.AccumuloSecurityException; +import org.apache.accumulo.core.client.ClientConfiguration; +import org.apache.accumulo.core.client.Connector; +import org.apache.accumulo.core.client.Instance; +import org.apache.accumulo.core.client.ZooKeeperInstance; +import org.apache.accumulo.core.client.impl.MasterClient; +import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; +import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; +import org.apache.accumulo.core.client.security.tokens.PasswordToken; +import org.apache.accumulo.core.conf.ConfigurationCopy; +import org.apache.accumulo.core.conf.Property; +import org.apache.accumulo.core.master.thrift.MasterClientService; +import org.apache.accumulo.core.master.thrift.MasterGoalState; +import org.apache.accumulo.core.master.thrift.MasterMonitorInfo; +import org.apache.accumulo.core.util.CachedConfiguration; +import org.apache.accumulo.core.util.Daemon; +import org.apache.accumulo.core.util.Pair; +import org.apache.accumulo.core.util.StringUtil; +import
[4/9] accumulo git commit: ACCUMULO-3291 Use target instead of /tmp
ACCUMULO-3291 Use target instead of /tmp Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0398fa70 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0398fa70 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0398fa70 Branch: refs/heads/1.5 Commit: 0398fa70be7758279c61735435be4c67f96bb104 Parents: 6d8c8c7 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:24:18 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:24:18 2014 -0500 -- .../MiniAccumuloClusterStartStopTest.java | 38 +++- 1 file changed, 21 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/0398fa70/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java -- diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java index f7440e8..a92342e 100644 --- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java +++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java @@ -16,36 +16,40 @@ */ package org.apache.accumulo.minicluster; +import java.io.File; import java.io.IOException; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.client.ZooKeeperInstance; import org.apache.accumulo.core.client.security.tokens.PasswordToken; -import org.junit.After; +import org.apache.commons.io.FileUtils; import org.junit.Assert; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.rules.TestName; public class MiniAccumuloClusterStartStopTest { - - public TemporaryFolder folder = new TemporaryFolder(); - + + private File baseDir = new File(System.getProperty(user.dir) + /target/mini-tests/ + this.getClass().getName()); + private File testDir; + + @Rule + public TestName testName = new TestName(); + @Before public void createMacDir() throws IOException { -folder.create(); - } - - @After - public void deleteMacDir() { -folder.delete(); +baseDir.mkdirs(); +testDir = new File(baseDir, testName.getMethodName()); +FileUtils.deleteQuietly(testDir); +testDir.mkdir(); } - + @Test public void multipleStartsThrowsAnException() throws Exception { -MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret); +MiniAccumuloCluster accumulo = new MiniAccumuloCluster(testDir, superSecret); accumulo.start(); - + try { accumulo.start(); Assert.fail(Invoking start() while already started is an error); @@ -55,12 +59,12 @@ public class MiniAccumuloClusterStartStopTest { accumulo.stop(); } } - + @Test public void multipleStopsIsAllowed() throws Exception { -MiniAccumuloCluster accumulo = new MiniAccumuloCluster(folder.getRoot(), superSecret); +MiniAccumuloCluster accumulo = new MiniAccumuloCluster(testDir, superSecret); accumulo.start(); - + Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector(root, new PasswordToken(superSecret)); conn.tableOperations().create(foo);
[9/9] accumulo git commit: Merge branch '1.6'
Merge branch '1.6' Conflicts: minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterStartStopTest.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/26db8eea Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/26db8eea Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/26db8eea Branch: refs/heads/master Commit: 26db8eea425b09911ce95d3992fdea9ef6a44278 Parents: 79c0a5e b8d31d7 Author: Christopher Tubbs ctubb...@apache.org Authored: Thu Dec 18 17:51:14 2014 -0500 Committer: Christopher Tubbs ctubb...@apache.org Committed: Thu Dec 18 17:51:14 2014 -0500 -- .../accumulo/minicluster/impl/MiniAccumuloClusterImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/accumulo/blob/26db8eea/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java --