public Tablet(TabletServer tabletServer, Text location, KeyExtent extent, TabletResourceManager trm, SortedMap<String,DataFileValue> datafiles, String time, long initFlushID, long initCompactID) throws IOException { this(tabletServer, location, extent, trm, CachedConfiguration.getInstance(), datafiles, time, initFlushID, initCompactID); splitCreationTime = System.currentTimeMillis(); }
static FileSystem getDefaultFileSystem() { try { Configuration conf = CachedConfiguration.getInstance(); conf.set("fs.file.impl", "org.apache.hadoop.fs.LocalFileSystem"); conf.set("fs.default.name", "file:///"); return FileSystem.get(CachedConfiguration.getInstance()); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static void ingest(Connector c, Opts opts, BatchWriterOpts batchWriterOpts) throws MutationsRejectedException, IOException, AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException { ingest(c, FileSystem.get(CachedConfiguration.getInstance()), opts, batchWriterOpts); } }
public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new WordCount(), args); System.exit(res); } }
public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new UniqueColumns(), args); System.exit(res); } }
/** * Utility to support certain client side utilities to minimize command-line options. */ public static String getInstanceIDFromHdfs(Path instanceDirectory, AccumuloConfiguration conf) { return getInstanceIDFromHdfs(instanceDirectory, conf, CachedConfiguration.getInstance()); }
public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new BulkIngestExample(), args); System.exit(res); } }
/** * * @param args * instanceName zookeepers username password table columns outputpath * @throws Exception */ public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new TableToFile(), args); if (res != 0) System.exit(res); } }
/** * * @param args * instanceName zookeepers username password table columns outputpath */ public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new ContinuousVerify(), args); if (res != 0) System.exit(res); } }
public static void main(String[] args) throws Exception { int res = ToolRunner.run(CachedConfiguration.getInstance(), new RowHash(), args); if (res != 0) System.exit(res); } }
public static void main(String[] args) throws Exception { Configuration conf = CachedConfiguration.getInstance(); conf.set("hadoop.tmp.dir", new File(args[0]).getParent()); conf.set("mapreduce.framework.name", "local"); conf.set("mapreduce.cluster.local.dir", new File(System.getProperty("user.dir"), "target/mapreduce-tmp").getAbsolutePath()); assertEquals(0, ToolRunner.run(conf, new MRTokenFileTester(), args)); } }
public static void main(String[] args) throws Exception { Configuration conf = CachedConfiguration.getInstance(); conf.set("hadoop.tmp.dir", new File(args[0]).getParent()); conf.set("mapreduce.framework.name", "local"); conf.set("mapreduce.cluster.local.dir", new File(System.getProperty("user.dir"), "target/mapreduce-tmp").getAbsolutePath()); assertEquals(0, ToolRunner.run(conf, new MRTokenFileTester(), args)); } }
protected void setWithCredentialProviders(String name, String credentialProviders) throws IOException { final Configuration conf = new Configuration(CachedConfiguration.getInstance()); conf.set(CredentialProviderFactoryShim.CREDENTIAL_PROVIDER_PATH, credentialProviders); char[] password = CredentialProviderFactoryShim.getValueFromCredentialProvider(conf, name); if (null == password) { throw new IOException( "No password could be extracted from CredentialProvider(s) with " + name); } setPassword(CharBuffer.wrap(password)); }
protected Configuration getHadoopConfiguration() { String credProviderPathsKey = Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey(); String credProviderPathsValue = getXmlConfig().get(credProviderPathsKey); if (null != credProviderPathsValue) { // We have configuration for a CredentialProvider // Try to pull the sensitive password from there Configuration conf = new Configuration(CachedConfiguration.getInstance()); conf.set(CredentialProviderFactoryShim.CREDENTIAL_PROVIDER_PATH, credProviderPathsValue); return conf; } return null; }
@Before public void checkCluster() throws Exception { Assume.assumeThat(getClusterType(), CoreMatchers.is(ClusterType.MINI)); MiniAccumuloClusterImpl.class.cast(getCluster()); fs = FileSystem.get(CachedConfiguration.getInstance()); }
public static void main(String[] args) throws IOException { FileSystem fs = FileSystem.get(CachedConfiguration.getInstance()); ServerConfiguration conf = new ServerConfiguration(HdfsZooInstance.getInstance()); OfflineMetadataScanner scanner = new OfflineMetadataScanner(conf.getConfiguration(), fs); scanner.setRange(Constants.METADATA_KEYSPACE); for (Entry<Key,Value> entry : scanner) System.out.println(entry.getKey() + " " + entry.getValue()); }
@Override public Repo<Master> call(long tid, Master environment) throws Exception { FileSystem fs = TraceFileSystem.wrap(FileUtil.getFileSystem(CachedConfiguration.getInstance(), ServerConfiguration.getSiteConfiguration())); String dir = ServerConstants.getTablesDir() + "/" + tableInfo.tableId; TabletOperations.createTabletDirectory(fs, dir, null); return new PopulateMetadata(tableInfo); }
public static void main(String[] args) throws Exception { SecurityUtil.serverLogin(); Instance instance = HdfsZooInstance.getInstance(); ServerConfiguration conf = new ServerConfiguration(instance); FileSystem fs = FileUtil.getFileSystem(CachedConfiguration.getInstance(), conf.getConfiguration()); Accumulo.init(fs, conf, "tracer"); String hostname = Accumulo.getLocalAddress(args); TraceServer server = new TraceServer(conf, hostname); Accumulo.enableTracing(hostname, "tserver"); server.run(); log.info("tracer stopping"); }
public static void main(String[] args) throws Exception { SecurityUtil.serverLogin(); FileSystem fs = FileUtil.getFileSystem(CachedConfiguration.getInstance(), ServerConfiguration.getSiteConfiguration()); String hostname = Accumulo.getLocalAddress(args); instance = HdfsZooInstance.getInstance(); config = new ServerConfiguration(instance); Accumulo.init(fs, config, "monitor"); Monitor monitor = new Monitor(); Accumulo.enableTracing(hostname, "monitor"); monitor.run(hostname); }
@Override public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName) throws IOException { Configuration conf = CachedConfiguration.getInstance(); FileSystem fs = FileSystem.get(conf); return RFileOperations.getInstance().newReaderBuilder().forFile(mapFileName, fs, conf) .withTableConfiguration(AccumuloConfiguration.getDefaultConfiguration()).seekToBeginning().build(); }