Skip to content

Commit

Permalink
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT
Browse files Browse the repository at this point in the history
Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
	core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
	test/src/main/java/org/apache/accumulo/test/continuous/ContinuousVerify.java
	test/system/continuous/run-verify.sh
  • Loading branch information
joshelser committed Jan 24, 2014
2 parents a147acd + 36cec4f commit 23bb432
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1,702 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

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.RowIterator;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
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.data.Column;
import org.apache.accumulo.core.data.Key;
Expand Down Expand Up @@ -115,7 +118,8 @@ SortedKeyValueIterator<Key,Value> getTopLevelIterator(SortedKeyValueIterator<Key
private Instance instance;
private ScannerOptions options;
private ArrayList<SortedKeyValueIterator<Key,Value>> readers;

private AccumuloConfiguration config;

/**
* @param instance
* @param credentials
Expand All @@ -137,6 +141,7 @@ public OfflineIterator(ScannerOptions options, Instance instance, TCredentials c

try {
conn = instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials));
config = new ConfigurationCopy(conn.instanceOperations().getSiteConfiguration());
nextTablet();

while (iter != null && !iter.hasTop())
Expand Down Expand Up @@ -229,8 +234,8 @@ private void nextTablet() throws TableNotFoundException, AccumuloException, IOEx

if (currentExtent != null && !extent.isPreviousExtent(currentExtent))
throw new AccumuloException(" " + currentExtent + " is not previous extent " + extent);
String tablesDir = Constants.getTablesDir(instance.getConfiguration());

String tablesDir = Constants.getTablesDir(config);
List<String> absFiles = new ArrayList<String>();
for (String relPath : relFiles) {
if (relPath.startsWith(".."))
Expand Down Expand Up @@ -291,9 +296,9 @@ private SortedKeyValueIterator<Key,Value> createIterator(KeyExtent extent, List<
AccumuloConfiguration acuTableConf = AccumuloConfiguration.getTableConfiguration(conn, tableId);

Configuration conf = CachedConfiguration.getInstance();
FileSystem fs = FileUtil.getFileSystem(conf, instance.getConfiguration());

FileSystem fs = FileUtil.getFileSystem(conf, config);

for (SortedKeyValueIterator<Key,Value> reader : readers) {
((FileSKVIterator) reader).close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import org.apache.accumulo.core.client.mapreduce.lib.util.InputConfigurator;
import org.apache.accumulo.core.client.mock.MockInstance;
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.SiteConfiguration;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.PartialKey;
Expand Down Expand Up @@ -324,15 +322,8 @@ public Instance getInstance() {
if (null == zooKeepers) {
return null;
}

ZooKeeperInstance zki = new ZooKeeperInstance(getInstanceName(), getZooKeepers());

// Wrap the DefaultConfiguration with a SiteConfiguration so we use accumulo-site.xml
// when it's present
AccumuloConfiguration xmlConfig = SiteConfiguration.getInstance(zki.getConfiguration());
zki.setConfiguration(xmlConfig);

return zki;

return new ZooKeeperInstance(getInstanceName(), getZooKeepers());
}

public String getInstanceName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,8 @@ public static Instance getInstance(Class<?> implementingClass, Configuration con
if ("MockInstance".equals(instanceType))
return new MockInstance(conf.get(enumToConfKey(implementingClass, InstanceOpts.NAME)));
else if ("ZooKeeperInstance".equals(instanceType)) {
ZooKeeperInstance zki = new ZooKeeperInstance(conf.get(enumToConfKey(implementingClass, InstanceOpts.NAME)), conf.get(enumToConfKey(implementingClass,
return new ZooKeeperInstance(conf.get(enumToConfKey(implementingClass, InstanceOpts.NAME)), conf.get(enumToConfKey(implementingClass,
InstanceOpts.ZOO_KEEPERS)));

// Wrap the DefaultConfiguration with a SiteConfiguration
AccumuloConfiguration xmlConfig = SiteConfiguration.getInstance(zki.getConfiguration());
zki.setConfiguration(xmlConfig);

return zki;
} else if (instanceType.isEmpty())
throw new IllegalStateException("Instance has not been configured for " + implementingClass.getSimpleName());
else
Expand Down
Loading

0 comments on commit 23bb432

Please sign in to comment.