private TabletLocationState fetch() { try { Entry<Key,Value> e = iter.next(); return createTabletLocationState(e.getKey(), e.getValue()); } catch (IOException | BadLocationStateException ex) { throw new RuntimeException(ex); } }
@Override public long isReady(long tid, Master master) throws Exception { if (!master.hasCycled(creationTime)) { return 50; } boolean done = true; Range tableRange = new KeyExtent(tableId, null, null).toMetadataRange(); Scanner scanner = master.getContext().createScanner(MetadataTable.NAME, Authorizations.EMPTY); MetaDataTableScanner.configureScanner(scanner, master); scanner.setRange(tableRange); for (Entry<Key,Value> entry : scanner) { TabletLocationState locationState = MetaDataTableScanner .createTabletLocationState(entry.getKey(), entry.getValue()); TabletState state = locationState.getState(master.onlineTabletServers()); if (!state.equals(TabletState.UNASSIGNED)) { // This code will even wait on tablets that are assigned to dead tablets servers. This is // intentional because the master may make metadata writes for these tablets. See #587 log.debug("Still waiting for table to be deleted: " + tableId + " locationState: " + locationState); done = false; break; } } if (!done) return 50; return 0; }
tls = MetaDataTableScanner.createTabletLocationState(k, v); if (tls == null) return;
TabletLocationState tls; try { tls = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue()); } catch (BadLocationStateException e) { log.error("{}", e.getMessage(), e);
private TabletLocationState fetch() { try { Entry<Key,Value> e = iter.next(); return createTabletLocationState(e.getKey(), e.getValue()); } catch (IOException ex) { throw new RuntimeException(ex); } catch (BadLocationStateException ex) { throw new RuntimeException(ex); } }
private TabletLocationState fetch() { try { Entry<Key,Value> e = iter.next(); return createTabletLocationState(e.getKey(), e.getValue()); } catch (IOException ex) { throw new RuntimeException(ex); } catch (BadLocationStateException ex) { throw new RuntimeException(ex); } }
@Override public long isReady(long tid, Master master) throws Exception { if (!master.hasCycled(creationTime)) { return 50; } boolean done = true; Range tableRange = new KeyExtent(new Text(tableId), null, null).toMetadataRange(); Scanner scanner = master.getConnector().createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS); MetaDataTableScanner.configureScanner(scanner, master); scanner.setRange(tableRange); for (Entry<Key,Value> entry : scanner) { TabletLocationState locationState = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue()); TabletState state = locationState.getState(master.onlineTabletServers()); if (state.equals(TabletState.ASSIGNED) || state.equals(TabletState.HOSTED)) { log.debug("Still waiting for table to be deleted: " + tableId + " locationState: " + locationState); done = false; break; } } if (!done) return 50; return 0; }
@Override public long isReady(long tid, Master master) throws Exception { if (!master.hasCycled(creationTime)) { return 50; } boolean done = true; Range tableRange = new KeyExtent(tableId, null, null).toMetadataRange(); Scanner scanner = master.getConnector().createScanner(MetadataTable.NAME, Authorizations.EMPTY); MetaDataTableScanner.configureScanner(scanner, master); scanner.setRange(tableRange); for (Entry<Key,Value> entry : scanner) { TabletLocationState locationState = MetaDataTableScanner .createTabletLocationState(entry.getKey(), entry.getValue()); TabletState state = locationState.getState(master.onlineTabletServers()); if (state.equals(TabletState.ASSIGNED) || state.equals(TabletState.HOSTED)) { log.debug("Still waiting for table to be deleted: " + tableId + " locationState: " + locationState); done = false; break; } } if (!done) return 50; return 0; }
tls = MetaDataTableScanner.createTabletLocationState(k, v); if (tls == null) return;
tls = MetaDataTableScanner.createTabletLocationState(k, v); if (tls == null) return;
TabletLocationState tls; try { tls = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue()); } catch (BadLocationStateException e) { log.error("{}", e.getMessage(), e);
TabletLocationState tls; try { tls = MetaDataTableScanner.createTabletLocationState(entry.getKey(), entry.getValue()); } catch (BadLocationStateException e) { log.error(e, e);