.setTimestamp(put.getTimestamp()) .setType(Cell.Type.Put) .setValue(Bytes.toBytes(state.name())) .build()); LOG.info(info.toString());
private static void addRegionStateToPut(Put put, RegionState.State state) throws IOException { put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY) .setRow(put.getRow()) .setFamily(HConstants.CATALOG_FAMILY) .setQualifier(getRegionStateColumn()) .setTimestamp(put.getTimestamp()) .setType(Cell.Type.Put) .setValue(Bytes.toBytes(state.name())) .build()); }
if (table != null && state != null && !table.equals("null") && !state.equals("null")) { rit = rit.stream().filter(regionStateNode -> regionStateNode.getTable().getNameAsString().equals(table)) .filter(regionStateNode -> regionStateNode.getState().name().equals(state)) .collect(Collectors.toList());
Bytes.toBytes(state.name())); LOG.info(info);
private void addStateAndBarrier(RegionInfo region, RegionState.State state, long... barriers) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); if (state != null) { put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); } for (int i = 0; i < barriers.length; i++) { put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER, put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i])); } try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }
private void addStateAndBarrier(RegionInfo region, RegionState.State state, long... barriers) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); if (state != null) { put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); } for (int i = 0; i < barriers.length; i++) { put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER, put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i])); } try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }
private void setState(RegionInfo region, RegionState.State state) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }
private static void addRegionStateToPut(Put put, RegionState.State state) throws IOException { put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY) .setRow(put.getRow()) .setFamily(HConstants.CATALOG_FAMILY) .setQualifier(getRegionStateColumn()) .setTimestamp(put.getTimestamp()) .setType(Cell.Type.Put) .setValue(Bytes.toBytes(state.name())) .build()); }
private static void addRegionStateToPut(Put put, RegionState.State state) throws IOException { put.add(CellBuilderFactory.create(CellBuilderType.SHALLOW_COPY) .setRow(put.getRow()) .setFamily(HConstants.CATALOG_FAMILY) .setQualifier(getRegionStateColumn()) .setTimestamp(put.getTimestamp()) .setType(Cell.Type.Put) .setValue(Bytes.toBytes(state.name())) .build()); }
private void addStateAndBarrier(RegionInfo region, RegionState.State state, long... barriers) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); if (state != null) { put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); } for (int i = 0; i < barriers.length; i++) { put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER, put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i])); } try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }
private void addStateAndBarrier(RegionInfo region, RegionState.State state, long... barriers) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); if (state != null) { put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); } for (int i = 0; i < barriers.length; i++) { put.addColumn(HConstants.REPLICATION_BARRIER_FAMILY, HConstants.SEQNUM_QUALIFIER, put.getTimeStamp() - barriers.length + i, Bytes.toBytes(barriers[i])); } try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }
private void setState(RegionInfo region, RegionState.State state) throws IOException { Put put = new Put(region.getRegionName(), EnvironmentEdgeManager.currentTime()); put.addColumn(HConstants.CATALOG_FAMILY, HConstants.STATE_QUALIFIER, Bytes.toBytes(state.name())); try (Table table = UTIL.getConnection().getTable(TableName.META_TABLE_NAME)) { table.put(put); } }