Search in sources :

Example 1 with RemoteEditLogManifestProto

use of org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto in project hadoop by apache.

the class TestPBHelper method convertAndCheckRemoteEditLogManifest.

private void convertAndCheckRemoteEditLogManifest(RemoteEditLogManifest m, List<RemoteEditLog> logs, long committedTxnId) {
    RemoteEditLogManifestProto mProto = PBHelper.convert(m);
    RemoteEditLogManifest m1 = PBHelper.convert(mProto);
    List<RemoteEditLog> logs1 = m1.getLogs();
    assertEquals(logs.size(), logs1.size());
    for (int i = 0; i < logs.size(); i++) {
        compare(logs.get(i), logs1.get(i));
    }
    assertEquals(committedTxnId, m.getCommittedTxnId());
}
Also used : RemoteEditLogManifest(org.apache.hadoop.hdfs.server.protocol.RemoteEditLogManifest) RemoteEditLogManifestProto(org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto) RemoteEditLog(org.apache.hadoop.hdfs.server.protocol.RemoteEditLog)

Aggregations

RemoteEditLogManifestProto (org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.RemoteEditLogManifestProto)1 RemoteEditLog (org.apache.hadoop.hdfs.server.protocol.RemoteEditLog)1 RemoteEditLogManifest (org.apache.hadoop.hdfs.server.protocol.RemoteEditLogManifest)1