Преглед изворни кода

ZOOKEEPER-4044: Remove unused method and variable

Author: lan <1728209643@qq.com>

Reviewers: maoling <maoling@apache.org>

Closes #1569 from lanicc/ZOOKEEPER-4044 and squashes the following commits:

987680396 [lan] ZOOKEEPER-4044: Remove unused variable in method `PrepRequestProcessor.pRequest2Txn`
646715bbe [lan] ZOOKEEPER-4044: Remove unused method in `FileSnap`
lan пре 4 година
родитељ
комит
a10c6b4a78

+ 0 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java

@@ -323,7 +323,6 @@ public class PrepRequestProcessor extends ZooKeeperCriticalThread implements Req
                     Time.currentWallTime(), type));
         }
 
-        PrecalculatedDigest precalculatedDigest;
         switch (type) {
         case OpCode.create:
         case OpCode.create2:

+ 0 - 16
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileSnap.java

@@ -265,22 +265,6 @@ public class FileSnap implements SnapShot {
         }
     }
 
-    private void writeChecksum(CheckedOutputStream crcOut, OutputArchive oa) throws IOException {
-        long val = crcOut.getChecksum().getValue();
-        oa.writeLong(val, "val");
-        oa.writeString("/", "path");
-    }
-
-    private void checkChecksum(CheckedInputStream crcIn, InputArchive ia) throws IOException {
-        long checkSum = crcIn.getChecksum().getValue();
-        long val = ia.readLong("val");
-        // read and ignore "/" written by writeChecksum
-        ia.readString("path");
-        if (val != checkSum) {
-            throw new IOException("CRC corruption");
-        }
-    }
-
     /**
      * synchronized close just so that if serialize is in place
      * the close operation will block and will wait till serialize