Package org.apache.accumulo.server.fs

Examples of org.apache.accumulo.server.fs.VolumeManager


    writer.append(new Key("internal", "cf", "cq3"), empty);
    writer.append(new Key("is", "cf", "cq4"), empty);
    writer.append(new Key("iterator", "cf", "cq5"), empty);
    writer.append(new Key("xyzzy", "cf", "cq"), empty);
    writer.close();
    VolumeManager vm = VolumeManagerImpl.get(acuConf);
    List<TabletLocation> overlaps = BulkImporter.findOverlappingTablets(acuConf, vm, locator, new Path(file), credentials);
    Assert.assertEquals(5, overlaps.size());
    Collections.sort(overlaps);
    Assert.assertEquals(new KeyExtent(tableId, new Text("a"), null), overlaps.get(0).tablet_extent);
    Assert.assertEquals(new KeyExtent(tableId, new Text("d"), new Text("cm")), overlaps.get(1).tablet_extent);
View Full Code Here


    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
    ServerOpts opts = new ServerOpts();
    opts.parseArgs("tracer", args);
    Instance instance = HdfsZooInstance.getInstance();
    ServerConfiguration conf = new ServerConfiguration(instance);
    VolumeManager fs = VolumeManagerImpl.get();
    Accumulo.init(fs, conf, "tracer");
    String hostname = opts.getAddress();
    TraceServer server = new TraceServer(conf, hostname);
    Accumulo.enableTracing(hostname, "tserver");
    server.run();
View Full Code Here

  public static void main(String[] args) throws UnknownHostException, IOException {
    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
    Instance instance = HdfsZooInstance.getInstance();
    ServerConfiguration serverConf = new ServerConfiguration(instance);
    final VolumeManager fs = VolumeManagerImpl.get();
    Accumulo.init(fs, serverConf, "gc");
    Opts opts = new Opts();
    opts.parseArgs("gc", args);
    SimpleGarbageCollector gc = new SimpleGarbageCollector(opts);
View Full Code Here

  }
 
  public static String createTabletDirectory(String tableDir, Text endRow) {
    while (true) {
      try {
        VolumeManager fs = VolumeManagerImpl.get();
        return createTabletDirectory(fs, tableDir, endRow);
      } catch (IOException e) {
        log.warn("problem creating tablet directory", e);
      } catch (IllegalArgumentException exception) {
        /* thrown in some edge cases of DNS failure by Hadoop instead of UnknownHostException */
 
View Full Code Here

      System.err.println("Usage: accumulo " + SetGoalState.class.getName() + " [NORMAL|SAFE_MODE|CLEAN_STOP]");
      System.exit(-1);
    }
    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());

    VolumeManager fs = VolumeManagerImpl.get();
    Accumulo.waitForZookeeperAndHdfs(fs);
    ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(Constants.UTF8),
        NodeExistsPolicy.OVERWRITE);
  }
View Full Code Here

  }

  public static void main(String[] args) throws Exception {
    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
   
    VolumeManager fs = VolumeManagerImpl.get();
    ServerOpts opts = new ServerOpts();
    opts.parseArgs("monitor", args);
    String hostname = opts.getAddress();

    instance = HdfsZooInstance.getInstance();
View Full Code Here

    @Parameter(description = " <table> { <table> ... } ")
    List<String> tables = new ArrayList<String>();
  }

  public static void main(String[] args) throws Exception {
    VolumeManager fs = VolumeManagerImpl.get();
    Opts opts = new Opts();
    opts.parseArgs(TableDiskUsage.class.getName(), args);
    Connector conn = opts.getConnector();
    org.apache.accumulo.server.util.TableDiskUsage.printDiskUsage(DefaultConfiguration.getInstance(), opts.tables, fs, conn, false);
  }
View Full Code Here

    try {
      AccumuloConfiguration acuConf = ServerConfiguration.getSiteConfiguration();
      SecurityUtil.serverLogin(acuConf);
      Configuration conf = CachedConfiguration.getInstance();

      VolumeManager fs = VolumeManagerImpl.get(acuConf);

      if (opts.resetSecurity) {
        if (isInitialized(fs)) {
          opts.rootpass = getRootPassword(opts);
          initSecurity(opts, HdfsZooInstance.getInstance().getInstanceID());
View Full Code Here

  public static void main(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(CheckForMetadataProblems.class.getName(), args);

    VolumeManager fs = VolumeManagerImpl.get();

    checkMetadataAndRootTableEntries(RootTable.NAME, opts, fs);
    checkMetadataAndRootTableEntries(MetadataTable.NAME, opts, fs);
    opts.stopTracing();
    if (sawProblems)
View Full Code Here

 
  public int run(String[] args) throws Exception {
    ClientOpts opts = new ClientOpts();
    opts.parseArgs(LocalityCheck.class.getName(), args);
   
    VolumeManager fs = VolumeManagerImpl.get();
    Connector connector = opts.getConnector();
    Scanner scanner = connector.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
    scanner.fetchColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME);
    scanner.fetchColumnFamily(DataFileColumnFamily.NAME);
    scanner.setRange(MetadataSchema.TabletsSection.getRange());
   
    Map<String,Long> totalBlocks = new HashMap<String,Long>();
    Map<String,Long> localBlocks = new HashMap<String,Long>();
    ArrayList<String> files = new ArrayList<String>();
   
    for (Entry<Key,Value> entry : scanner) {
      Key key = entry.getKey();
      if (key.compareColumnFamily(TabletsSection.CurrentLocationColumnFamily.NAME) == 0) {
        String location = entry.getValue().toString();
        String[] parts = location.split(":");
        String host = parts[0];
        addBlocks(fs, host, files, totalBlocks, localBlocks);
        files.clear();
      } else if (key.compareColumnFamily(DataFileColumnFamily.NAME) == 0) {
       
        files.add(fs.getFullPath(key).toString());
      }
    }
    System.out.println(" Server         %local  total blocks");
    for (Entry<String,Long> entry : totalBlocks.entrySet()) {
      final String host = entry.getKey();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.fs.VolumeManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.