Java Code Examples for org.apache.hadoop.hbase.client.SnapshotDescription#getName()
The following examples show how to use
org.apache.hadoop.hbase.client.SnapshotDescription#getName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProtobufUtil.java From hbase with Apache License 2.0 | 6 votes |
/** * Convert from {@link SnapshotDescription} to * {@link org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription} * @param snapshotDesc the POJO SnapshotDescription * @return the protobuf SnapshotDescription */ public static SnapshotProtos.SnapshotDescription createHBaseProtosSnapshotDesc(SnapshotDescription snapshotDesc) { SnapshotProtos.SnapshotDescription.Builder builder = SnapshotProtos.SnapshotDescription.newBuilder(); if (snapshotDesc.getTableName() != null) { builder.setTable(snapshotDesc.getTableNameAsString()); } if (snapshotDesc.getName() != null) { builder.setName(snapshotDesc.getName()); } if (snapshotDesc.getOwner() != null) { builder.setOwner(snapshotDesc.getOwner()); } if (snapshotDesc.getCreationTime() != -1L) { builder.setCreationTime(snapshotDesc.getCreationTime()); } if (snapshotDesc.getTtl() != -1L && snapshotDesc.getTtl() < TimeUnit.MILLISECONDS.toSeconds(Long.MAX_VALUE)) { builder.setTtl(snapshotDesc.getTtl()); } if (snapshotDesc.getVersion() != -1) { builder.setVersion(snapshotDesc.getVersion()); } builder.setType(ProtobufUtil.createProtosSnapShotDescType(snapshotDesc.getType())); return builder.build(); }
Example 2
Source File: SnapshotDoesNotExistException.java From hbase with Apache License 2.0 | 4 votes |
/** * @param snapshotDescription expected snapshot to find */ public SnapshotDoesNotExistException(SnapshotDescription snapshotDescription) { super("Snapshot '" + snapshotDescription.getName() + "' doesn't exist on the filesystem", snapshotDescription); }