private static void listZookeeper(ServerContext context) throws Exception { System.out.println("Listing volumes referenced in zookeeper"); TreeSet<String> volumes = new TreeSet<>(); volumes.add(getTableURI(MetadataTableUtil.getRootTabletDir(context))); ArrayList<LogEntry> result = new ArrayList<>(); MetadataTableUtil.getRootLogEntries(context, result); for (LogEntry logEntry : result) { getLogURIs(volumes, logEntry); } for (String volume : volumes) System.out.println("\tVolume : " + volume); }
if (extent.isRootTablet()) { getRootLogEntries(context, result); Path rootDir = new Path(getRootTabletDir(context)); FileStatus[] files = fs.listStatus(rootDir); for (FileStatus fileStatus : files) {
public TabletData(ServerContext context, VolumeManager fs, AccumuloConfiguration conf) throws IOException { directory = VolumeUtil.switchRootTableVolume(context, MetadataTableUtil.getRootTabletDir(context));
private static Pair<Text,KeyExtent> verifyRootTablet(ServerContext context, TServerInstance instance) throws AccumuloException { ZooTabletStateStore store = new ZooTabletStateStore(context); if (!store.iterator().hasNext()) { throw new AccumuloException("Illegal state: location is not set in zookeeper"); } TabletLocationState next = store.iterator().next(); if (!instance.equals(next.future)) { throw new AccumuloException("Future location is not to this server for the root tablet"); } if (next.current != null) { throw new AccumuloException("Root tablet already has a location set"); } try { return new Pair<>(new Text(MetadataTableUtil.getRootTabletDir(context)), null); } catch (IOException e) { throw new AccumuloException(e); } }
private static void listZookeeper() throws Exception { System.out.println("Listing volumes referenced in zookeeper"); TreeSet<String> volumes = new TreeSet<>(); volumes.add(getTableURI(MetadataTableUtil.getRootTabletDir())); ArrayList<LogEntry> result = new ArrayList<>(); MetadataTableUtil.getRootLogEntries(result); for (LogEntry logEntry : result) { getLogURIs(volumes, logEntry); } for (String volume : volumes) System.out.println("\tVolume : " + volume); }
if (extent.isRootTablet()) { getRootLogEntries(result); Path rootDir = new Path(getRootTabletDir()); FileStatus[] files = fs.listStatus(rootDir); for (FileStatus fileStatus : files) {
public TabletData(VolumeManager fs, ZooReader rdr, AccumuloConfiguration conf) throws IOException { directory = VolumeUtil.switchRootTableVolume(MetadataTableUtil.getRootTabletDir());
private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance instance) throws DistributedStoreException, AccumuloException { ZooTabletStateStore store = new ZooTabletStateStore(); if (!store.iterator().hasNext()) { throw new AccumuloException("Illegal state: location is not set in zookeeper"); } TabletLocationState next = store.iterator().next(); if (!instance.equals(next.future)) { throw new AccumuloException("Future location is not to this server for the root tablet"); } if (next.current != null) { throw new AccumuloException("Root tablet already has a location set"); } try { return new Pair<>(new Text(MetadataTableUtil.getRootTabletDir()), null); } catch (IOException e) { throw new AccumuloException(e); } }