Examples of VolumeManager


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

      HashMap<Property,String> testProps = new HashMap<Property,String>();
      testProps.put(Property.INSTANCE_VOLUMES, v1.toURI().toString() + "," + v2.toURI().toString());

      AccumuloConfiguration testConf = new FileUtilTestConfiguration(testProps);
      VolumeManager fs = VolumeManagerImpl.getLocal(accumuloDir.getAbsolutePath());

      FileUtil.cleanupIndexOp(testConf, tmpPath1, fs, new ArrayList<FileSKVIterator>());

      Assert.assertFalse("Expected " + tmp1 + " to be cleaned up but it wasn't", tmp1.exists());
View Full Code Here

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

      HashMap<Property,String> testProps = new HashMap<Property,String>();
      testProps.put(Property.INSTANCE_VOLUMES, v1.toURI().toString() + "," + v2.toURI().toString());

      AccumuloConfiguration testConf = new FileUtilTestConfiguration(testProps);
      VolumeManager fs = VolumeManagerImpl.getLocal(accumuloDir.getAbsolutePath());

      FileUtil.cleanupIndexOp(testConf, tmpPath1, fs, new ArrayList<FileSKVIterator>());

      Assert.assertFalse("Expected " + tmp1 + " to be cleaned up but it wasn't", tmp1.exists());
View Full Code Here

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

  synchronized public static ZooConfiguration getInstance(AccumuloConfiguration parent) {
    if (instance == null) {
      propCache = new ZooCache(parent.get(Property.INSTANCE_ZK_HOST), (int) parent.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
      instance = new ZooConfiguration(parent);
      // InstanceID should be the same across all volumes, so just choose one
      VolumeManager fs;
      try {
        fs = VolumeManagerImpl.get();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

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

    Key prevRowKey = new Key(new Text(KeyExtent.getMetadataEntry(table, metadataPrevEndRow)));
   
    ScannerImpl scanner2 = new ScannerImpl(HdfsZooInstance.getInstance(), credentials, MetadataTable.ID, Authorizations.EMPTY);
    scanner2.setRange(new Range(prevRowKey, prevRowKey.followingKey(PartialKey.ROW)));
   
    VolumeManager fs = VolumeManagerImpl.get();
    if (!scanner2.iterator().hasNext()) {
      log.info("Rolling back incomplete split " + metadataEntry + " " + metadataPrevEndRow);
      MetadataTableUtil.rollBackSplit(metadataEntry, KeyExtent.decodePrevEndRow(oper), credentials, lock);
      return new KeyExtent(metadataEntry, KeyExtent.decodePrevEndRow(oper));
    } else {
View Full Code Here

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

    timer = new StopWatch<Timers>(Timers.class);
    timer.start(Timers.TOTAL);
   
    Configuration conf = CachedConfiguration.getInstance();
    VolumeManagerImpl.get(acuConf);
    final VolumeManager fs = VolumeManagerImpl.get(acuConf);

    Set<Path> paths = new HashSet<Path>();
    for (String file : files) {
      paths.add(new Path(file));
    }
View Full Code Here

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

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

    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

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

  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

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

  }
 
  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

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

      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
TOP
Copyright © 2018 www.massapi.com. 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.