mirror of https://github.com/tikv/client-java.git
support DataEncode in BackupMeta (#287)
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
This commit is contained in:
parent
599da193df
commit
b82276231c
|
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
kvproto_hash=465fa4c7b42e644d5aacaf79d06c75733dc12eb3
|
||||
kvproto_hash=d62ddcee4ccd95f19f3ffa89c2832f2fb81030ca
|
||||
raft_rs_hash=b9891b673573fad77ebcf9bbe0969cf945841926
|
||||
tipb_hash=c4d518eb1d60c21f05b028b36729e64610346dac
|
||||
|
||||
|
|
|
|||
|
|
@ -41,11 +41,13 @@ public class BackupDecoder implements Serializable {
|
|||
}
|
||||
|
||||
private KVDecoder initKVDecoder() throws SSTDecodeException {
|
||||
// Currently only v1 is supported.
|
||||
// V2 will be added after https://github.com/tikv/tikv/issues/10938.
|
||||
if (backupMeta.getIsRawKv()) {
|
||||
// TODO: ttl_enable should be witten to BackupMeta
|
||||
return new RawKVDecoderV1(ttlEnabled);
|
||||
if ("V1".equals(backupMeta.getApiVersion().name())) {
|
||||
return new RawKVDecoderV1(ttlEnabled);
|
||||
} else {
|
||||
throw new SSTDecodeException(
|
||||
"does not support decode APIVersion " + backupMeta.getApiVersion().name());
|
||||
}
|
||||
} else {
|
||||
throw new SSTDecodeException("TxnKV is not supported yet!");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue