You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by an...@apache.org on 2018/10/19 12:40:49 UTC
[51/51] [partial] zookeeper git commit: ZOOKEEPER-3032: MAVEN
MIGRATION - zookeeper-server
ZOOKEEPER-3032: MAVEN MIGRATION - zookeeper-server
Separating the java code is not feasible. Moving common and client back to server.
Author: Norbert Kalmar <nk...@yahoo.com>
Reviewers: andor@apache.org
Closes #672 from nkalmar/ZOOKEEPER-3032r
Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/cb9f303b
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/cb9f303b
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/cb9f303b
Branch: refs/heads/master
Commit: cb9f303bda9137d1aebe8eff3eab85c8a59f3cdd
Parents: 5c85a23
Author: Norbert Kalmar <nk...@yahoo.com>
Authored: Fri Oct 19 14:39:50 2018 +0200
Committer: Andor Molnar <an...@apache.org>
Committed: Fri Oct 19 14:39:50 2018 +0200
----------------------------------------------------------------------
.gitignore | 4 +-
bin/zkEnv.sh | 2 +-
build.xml | 175 +-
docs/zookeeperReconfig.html | 4 +-
.../zookeeper-client-c/tests/zkServer.sh | 2 +-
.../zookeeper/client/ConnectStringParser.java | 95 -
.../zookeeper/client/FourLetterWordMain.java | 146 -
.../apache/zookeeper/client/HostProvider.java | 76 -
.../zookeeper/client/StaticHostProvider.java | 383 ---
.../apache/zookeeper/client/ZKClientConfig.java | 140 -
.../zookeeper/client/ZooKeeperSaslClient.java | 477 ---
.../zookeeper/client/ZKClientConfigTest.java | 191 --
.../org/apache/zookeeper/AsyncCallback.java | 331 --
.../java/org/apache/zookeeper/ClientCnxn.java | 1660 ----------
.../org/apache/zookeeper/ClientCnxnSocket.java | 248 --
.../apache/zookeeper/ClientCnxnSocketNIO.java | 432 ---
.../apache/zookeeper/ClientCnxnSocketNetty.java | 451 ---
.../apache/zookeeper/ClientWatchManager.java | 40 -
.../java/org/apache/zookeeper/CreateMode.java | 166 -
.../java/org/apache/zookeeper/Environment.java | 112 -
.../apache/zookeeper/JLineZNodeCompleter.java | 86 -
.../org/apache/zookeeper/KeeperException.java | 859 -----
.../main/java/org/apache/zookeeper/Login.java | 422 ---
.../org/apache/zookeeper/MultiResponse.java | 177 --
.../zookeeper/MultiTransactionRecord.java | 163 -
.../src/main/java/org/apache/zookeeper/Op.java | 452 ---
.../java/org/apache/zookeeper/OpResult.java | 205 --
.../main/java/org/apache/zookeeper/Quotas.java | 68 -
.../zookeeper/SaslClientCallbackHandler.java | 104 -
.../org/apache/zookeeper/ServerAdminClient.java | 280 --
.../main/java/org/apache/zookeeper/Shell.java | 480 ---
.../java/org/apache/zookeeper/StatsTrack.java | 101 -
.../java/org/apache/zookeeper/Testable.java | 29 -
.../java/org/apache/zookeeper/Transaction.java | 70 -
.../main/java/org/apache/zookeeper/Version.java | 92 -
.../apache/zookeeper/WatchDeregistration.java | 70 -
.../java/org/apache/zookeeper/WatchedEvent.java | 81 -
.../main/java/org/apache/zookeeper/Watcher.java | 201 --
.../apache/zookeeper/ZKHostnameVerifier.java | 349 ---
.../org/apache/zookeeper/ZKTrustManager.java | 150 -
.../main/java/org/apache/zookeeper/ZKUtil.java | 171 -
.../main/java/org/apache/zookeeper/ZooDefs.java | 141 -
.../java/org/apache/zookeeper/ZooKeeper.java | 2965 ------------------
.../org/apache/zookeeper/ZooKeeperMain.java | 664 ----
.../org/apache/zookeeper/ZooKeeperTestable.java | 47 -
.../apache/zookeeper/admin/ZooKeeperAdmin.java | 254 --
.../org/apache/zookeeper/cli/AclParser.java | 81 -
.../apache/zookeeper/cli/AddAuthCommand.java | 69 -
.../org/apache/zookeeper/cli/CliCommand.java | 117 -
.../org/apache/zookeeper/cli/CliException.java | 57 -
.../apache/zookeeper/cli/CliParseException.java | 31 -
.../zookeeper/cli/CliWrapperException.java | 60 -
.../org/apache/zookeeper/cli/CloseCommand.java | 46 -
.../zookeeper/cli/CommandNotFoundException.java | 26 -
.../org/apache/zookeeper/cli/CreateCommand.java | 134 -
.../apache/zookeeper/cli/DelQuotaCommand.java | 161 -
.../apache/zookeeper/cli/DeleteAllCommand.java | 82 -
.../org/apache/zookeeper/cli/DeleteCommand.java | 91 -
.../org/apache/zookeeper/cli/GetAclCommand.java | 106 -
.../org/apache/zookeeper/cli/GetCommand.java | 98 -
.../apache/zookeeper/cli/GetConfigCommand.java | 84 -
.../apache/zookeeper/cli/ListQuotaCommand.java | 82 -
.../org/apache/zookeeper/cli/Ls2Command.java | 72 -
.../org/apache/zookeeper/cli/LsCommand.java | 137 -
.../cli/MalformedCommandException.java | 25 -
.../zookeeper/cli/MalformedPathException.java | 25 -
.../apache/zookeeper/cli/ReconfigCommand.java | 169 -
.../zookeeper/cli/RemoveWatchesCommand.java | 89 -
.../org/apache/zookeeper/cli/SetAclCommand.java | 104 -
.../org/apache/zookeeper/cli/SetCommand.java | 81 -
.../apache/zookeeper/cli/SetQuotaCommand.java | 216 --
.../org/apache/zookeeper/cli/StatCommand.java | 95 -
.../org/apache/zookeeper/cli/StatPrinter.java | 49 -
.../org/apache/zookeeper/cli/SyncCommand.java | 74 -
.../common/AtomicFileOutputStream.java | 126 -
.../common/AtomicFileWritingIdiom.java | 89 -
.../apache/zookeeper/common/ClientX509Util.java | 38 -
.../org/apache/zookeeper/common/IOUtils.java | 123 -
.../org/apache/zookeeper/common/NetUtils.java | 43 -
.../org/apache/zookeeper/common/PathTrie.java | 294 --
.../org/apache/zookeeper/common/PathUtils.java | 120 -
.../apache/zookeeper/common/QuorumX509Util.java | 32 -
.../apache/zookeeper/common/StringUtils.java | 63 -
.../java/org/apache/zookeeper/common/Time.java | 52 -
.../apache/zookeeper/common/X509Exception.java | 67 -
.../org/apache/zookeeper/common/X509Util.java | 363 ---
.../org/apache/zookeeper/common/ZKConfig.java | 280 --
.../apache/zookeeper/util/SecurityUtils.java | 298 --
.../apache/zookeeper/version/util/VerGen.java | 169 -
.../src/main/resources/lib/cobertura/README.txt | 3 -
.../resources/lib/jdiff/zookeeper_3.1.1.xml | 2717 ----------------
.../main/resources/lib/jline-2.11.LICENSE.txt | 35 -
.../main/resources/lib/log4j-1.2.17.LICENSE.txt | 202 --
.../main/resources/lib/slf4j-1.7.25.LICENSE.txt | 22 -
.../apache/zookeeper/ClientCnxnSocketTest.java | 53 -
.../apache/zookeeper/ClientReconnectTest.java | 78 -
.../zookeeper/ClientRequestTimeoutTest.java | 157 -
.../zookeeper/CustomHostProviderTest.java | 79 -
.../apache/zookeeper/JUnit4ZKTestRunner.java | 110 -
.../org/apache/zookeeper/JaasConfiguration.java | 75 -
.../java/org/apache/zookeeper/MockPacket.java | 46 -
.../org/apache/zookeeper/MultiResponseTest.java | 72 -
.../zookeeper/MultiTransactionRecordTest.java | 68 -
.../org/apache/zookeeper/PortAssignment.java | 210 --
.../apache/zookeeper/PortAssignmentTest.java | 80 -
.../apache/zookeeper/RemoveWatchesCmdTest.java | 345 --
.../org/apache/zookeeper/RemoveWatchesTest.java | 1258 --------
.../java/org/apache/zookeeper/SaslAuthTest.java | 252 --
.../org/apache/zookeeper/ServerConfigTest.java | 74 -
.../org/apache/zookeeper/TestableZooKeeper.java | 128 -
.../java/org/apache/zookeeper/VerGenTest.java | 79 -
.../org/apache/zookeeper/ZKParameterized.java | 58 -
.../java/org/apache/zookeeper/ZKTestCase.java | 78 -
.../org/apache/zookeeper/ZooKeeperTest.java | 594 ----
.../common/AtomicFileWritingIdiomTest.java | 360 ---
.../apache/zookeeper/common/NetUtilsTest.java | 72 -
.../apache/zookeeper/common/PathUtilsTest.java | 129 -
.../org/apache/zookeeper/common/TimeTest.java | 109 -
.../apache/zookeeper/common/X509UtilTest.java | 264 --
.../zookeeper/common/ZKTrustManagerTest.java | 248 --
.../org/apache/zookeeper/test/ACLCountTest.java | 111 -
.../org/apache/zookeeper/test/ACLRootTest.java | 94 -
.../java/org/apache/zookeeper/test/ACLTest.java | 282 --
.../apache/zookeeper/test/AsyncHammerTest.java | 244 --
.../org/apache/zookeeper/test/AsyncOps.java | 827 -----
.../org/apache/zookeeper/test/AsyncOpsTest.java | 271 --
.../org/apache/zookeeper/test/AsyncTest.java | 145 -
.../test/AtomicFileOutputStreamTest.java | 200 --
.../org/apache/zookeeper/test/AuthTest.java | 174 -
.../apache/zookeeper/test/BufferSizeTest.java | 135 -
.../apache/zookeeper/test/ChrootAsyncTest.java | 47 -
.../apache/zookeeper/test/ChrootClientTest.java | 54 -
.../org/apache/zookeeper/test/ChrootTest.java | 136 -
.../org/apache/zookeeper/test/ClientBase.java | 779 -----
.../apache/zookeeper/test/ClientHammerTest.java | 246 --
.../zookeeper/test/ClientPortBindTest.java | 110 -
.../apache/zookeeper/test/ClientRetryTest.java | 73 -
.../apache/zookeeper/test/ClientSSLTest.java | 132 -
.../zookeeper/test/ClientSkipACLTest.java | 34 -
.../org/apache/zookeeper/test/ClientTest.java | 870 -----
.../apache/zookeeper/test/CnxManagerTest.java | 524 ----
.../zookeeper/test/ConnectStringParserTest.java | 90 -
.../apache/zookeeper/test/CreateModeTest.java | 91 -
.../org/apache/zookeeper/test/CreateTest.java | 115 -
.../zookeeper/test/DisconnectableZooKeeper.java | 58 -
.../zookeeper/test/DisconnectedWatcherTest.java | 255 --
.../test/DuplicateLocalSessionUpgradeTest.java | 113 -
.../test/EmptiedSnapshotRecoveryTest.java | 133 -
.../apache/zookeeper/test/EventTypeTest.java | 50 -
.../apache/zookeeper/test/FLENewEpochTest.java | 193 --
.../apache/zookeeper/test/FLEPredicateTest.java | 108 -
.../apache/zookeeper/test/FLERestartTest.java | 189 --
.../java/org/apache/zookeeper/test/FLETest.java | 537 ----
.../zookeeper/test/FLEZeroWeightTest.java | 175 --
.../test/FollowerResyncConcurrencyTest.java | 748 -----
.../test/FourLetterWordsQuorumTest.java | 119 -
.../zookeeper/test/FourLetterWordsTest.java | 245 --
.../test/FourLetterWordsWhiteListTest.java | 251 --
.../apache/zookeeper/test/GetChildren2Test.java | 136 -
.../zookeeper/test/GetProposalFromTxnTest.java | 137 -
.../zookeeper/test/HierarchicalQuorumTest.java | 327 --
.../apache/zookeeper/test/IntegrityCheck.java | 221 --
.../zookeeper/test/InvalidSnapshotTest.java | 110 -
.../java/org/apache/zookeeper/test/JMXEnv.java | 322 --
.../apache/zookeeper/test/KeeperStateTest.java | 76 -
.../zookeeper/test/KeyAuthClientTest.java | 131 -
.../test/LeaderSessionTrackerTest.java | 163 -
.../zookeeper/test/LoadFromLogNoServerTest.java | 176 --
.../apache/zookeeper/test/LoadFromLogTest.java | 310 --
.../zookeeper/test/LocalSessionRequestTest.java | 148 -
.../zookeeper/test/LocalSessionsOnlyTest.java | 138 -
.../apache/zookeeper/test/LogChopperTest.java | 129 -
.../org/apache/zookeeper/test/MaxCnxnsTest.java | 136 -
.../test/MultiAsyncTransactionTest.java | 135 -
.../zookeeper/test/MultiTransactionTest.java | 806 -----
.../test/NIOConnectionFactoryFdLeakTest.java | 69 -
.../zookeeper/test/NettyNettySuiteBase.java | 49 -
.../test/NettyNettySuiteHammerTest.java | 30 -
.../zookeeper/test/NettyNettySuiteTest.java | 38 -
.../zookeeper/test/NioNettySuiteBase.java | 44 -
.../zookeeper/test/NioNettySuiteHammerTest.java | 30 -
.../zookeeper/test/NioNettySuiteTest.java | 38 -
.../zookeeper/test/NonRecoverableErrorTest.java | 185 --
.../org/apache/zookeeper/test/NullDataTest.java | 75 -
.../java/org/apache/zookeeper/test/OOMTest.java | 162 -
.../org/apache/zookeeper/test/OSMXBeanTest.java | 71 -
.../test/ObserverHierarchicalQuorumTest.java | 39 -
.../apache/zookeeper/test/ObserverLETest.java | 76 -
.../test/ObserverQuorumHammerTest.java | 39 -
.../org/apache/zookeeper/test/ObserverTest.java | 232 --
.../org/apache/zookeeper/test/QuorumBase.java | 436 ---
.../apache/zookeeper/test/QuorumHammerTest.java | 51 -
.../zookeeper/test/QuorumMajorityTest.java | 106 -
.../apache/zookeeper/test/QuorumQuotaTest.java | 59 -
.../org/apache/zookeeper/test/QuorumTest.java | 415 ---
.../org/apache/zookeeper/test/QuorumUtil.java | 326 --
.../apache/zookeeper/test/QuorumUtilTest.java | 94 -
.../zookeeper/test/QuorumZxidSyncTest.java | 173 -
.../apache/zookeeper/test/ReadOnlyModeTest.java | 309 --
.../zookeeper/test/ReconfigExceptionTest.java | 213 --
.../zookeeper/test/ReconfigMisconfigTest.java | 129 -
.../org/apache/zookeeper/test/ReconfigTest.java | 1114 -------
.../org/apache/zookeeper/test/RecoveryTest.java | 209 --
.../zookeeper/test/RepeatStartupTest.java | 69 -
.../zookeeper/test/RestoreCommittedLogTest.java | 83 -
.../org/apache/zookeeper/test/SSLAuthTest.java | 105 -
.../org/apache/zookeeper/test/SSLTest.java.orig | 130 -
.../test/SaslAuthDesignatedClientTest.java | 166 -
.../test/SaslAuthDesignatedServerTest.java | 104 -
.../test/SaslAuthFailDesignatedClientTest.java | 92 -
.../zookeeper/test/SaslAuthFailNotifyTest.java | 98 -
.../apache/zookeeper/test/SaslAuthFailTest.java | 76 -
.../test/SaslAuthMissingClientConfigTest.java | 81 -
.../apache/zookeeper/test/SaslClientTest.java | 69 -
.../zookeeper/test/SaslSuperUserTest.java | 136 -
.../apache/zookeeper/test/ServerCnxnTest.java | 129 -
.../zookeeper/test/SessionInvalidationTest.java | 105 -
.../org/apache/zookeeper/test/SessionTest.java | 412 ---
.../zookeeper/test/SessionTimeoutTest.java | 129 -
.../zookeeper/test/SessionTrackerCheckTest.java | 227 --
.../zookeeper/test/SessionUpgradeTest.java | 232 --
.../org/apache/zookeeper/test/SledgeHammer.java | 111 -
.../apache/zookeeper/test/StandaloneTest.java | 167 -
.../org/apache/zookeeper/test/StatTest.java | 205 --
.../zookeeper/test/StaticHostProviderTest.java | 932 ------
.../apache/zookeeper/test/StringUtilTest.java | 44 -
.../org/apache/zookeeper/test/SyncCallTest.java | 122 -
.../org/apache/zookeeper/test/TestHammer.java | 61 -
.../org/apache/zookeeper/test/TestUtils.java | 60 -
.../org/apache/zookeeper/test/TruncateTest.java | 247 --
.../test/WatchEventWhenAutoResetTest.java | 218 --
.../apache/zookeeper/test/WatchedEventTest.java | 94 -
.../apache/zookeeper/test/WatcherFuncTest.java | 478 ---
.../org/apache/zookeeper/test/WatcherTest.java | 463 ---
.../org/apache/zookeeper/test/X509AuthTest.java | 290 --
.../test/ZkDatabaseCorruptionTest.java | 170 -
.../zookeeper/test/ZooKeeperQuotaTest.java | 79 -
.../zookeeper/test/ZooKeeperTestClient.java | 467 ---
.../src/test/resources/check_compatibility.py | 204 --
.../resources/checkstyle-noframes-sorted.xsl | 178 --
.../src/test/resources/checkstyle.xml | 187 --
.../data/buffersize/create/version-2/log.1 | Bin 51216 -> 0 bytes
.../data/buffersize/create/version-2/snapshot.0 | Bin 296 -> 0 bytes
.../data/buffersize/set/version-2/log.1 | Bin 51216 -> 0 bytes
.../data/buffersize/set/version-2/snapshot.0 | Bin 296 -> 0 bytes
.../data/buffersize/snapshot/version-2/log.1 | Bin 51216 -> 0 bytes
.../buffersize/snapshot/version-2/snapshot.0 | Bin 296 -> 0 bytes
.../buffersize/snapshot/version-2/snapshot.2 | Bin 5429 -> 0 bytes
.../resources/data/invalidsnap/version-2/log.1 | Bin 59360 -> 0 bytes
.../data/invalidsnap/version-2/log.274 | Bin 91616 -> 0 bytes
.../resources/data/invalidsnap/version-2/log.42 | Bin 184 -> 0 bytes
.../data/invalidsnap/version-2/log.63b | Bin 49008 -> 0 bytes
.../data/invalidsnap/version-2/snapshot.0 | Bin 296 -> 0 bytes
.../data/invalidsnap/version-2/snapshot.272 | Bin 56408 -> 0 bytes
.../data/invalidsnap/version-2/snapshot.273 | Bin 56521 -> 0 bytes
.../data/invalidsnap/version-2/snapshot.639 | Bin 143163 -> 0 bytes
.../data/invalidsnap/version-2/snapshot.83f | Bin 4824 -> 0 bytes
.../resources/data/kerberos/minikdc-krb5.conf | 30 -
.../test/resources/data/kerberos/minikdc.ldiff | 52 -
.../src/test/resources/data/ssl/README.md | 10 -
.../test/resources/data/ssl/testKeyStore.jks | Bin 2250 -> 0 bytes
.../test/resources/data/ssl/testTrustStore.jks | Bin 960 -> 0 bytes
.../test/resources/data/upgrade/log.100000001 | Bin 2458624 -> 0 bytes
.../test/resources/data/upgrade/log.100001bf0 | Bin 1025024 -> 0 bytes
.../resources/data/upgrade/snapshot.100000000 | Bin 73 -> 0 bytes
.../resources/data/upgrade/snapshot.100001bec | Bin 2567595 -> 0 bytes
.../src/test/resources/findbugsExcludeFile.xml | 202 --
.../src/test/resources/test-github-pr.sh | 616 ----
.../src/test/resources/test-patch.properties | 18 -
.../src/test/resources/test-patch.sh | 649 ----
.../src/test/resources/test-scripts.sh | 223 --
zookeeper-contrib/build-contrib.xml | 4 +-
.../zookeeper-contrib-fatjar/build.xml | 2 +-
.../zookeeper-contrib-rest/build.xml | 4 +-
.../zookeeper-contrib-rest/src/test/zkServer.sh | 2 +-
.../src/test/zkServer.sh | 2 +-
.../content/xdocs/zookeeperReconfig.xml | 4 +-
zookeeper-recipes/build-recipes.xml | 2 +-
.../src/main/c/tests/zkServer.sh | 2 +-
.../src/main/c/tests/zkServer.sh | 2 +-
.../org/apache/zookeeper/AsyncCallback.java | 331 ++
.../java/org/apache/zookeeper/ClientCnxn.java | 1660 ++++++++++
.../org/apache/zookeeper/ClientCnxnSocket.java | 248 ++
.../apache/zookeeper/ClientCnxnSocketNIO.java | 432 +++
.../apache/zookeeper/ClientCnxnSocketNetty.java | 451 +++
.../apache/zookeeper/ClientWatchManager.java | 40 +
.../java/org/apache/zookeeper/CreateMode.java | 166 +
.../java/org/apache/zookeeper/Environment.java | 112 +
.../apache/zookeeper/JLineZNodeCompleter.java | 86 +
.../org/apache/zookeeper/KeeperException.java | 859 +++++
.../main/java/org/apache/zookeeper/Login.java | 422 +++
.../org/apache/zookeeper/MultiResponse.java | 177 ++
.../zookeeper/MultiTransactionRecord.java | 163 +
.../src/main/java/org/apache/zookeeper/Op.java | 452 +++
.../java/org/apache/zookeeper/OpResult.java | 205 ++
.../main/java/org/apache/zookeeper/Quotas.java | 68 +
.../zookeeper/SaslClientCallbackHandler.java | 104 +
.../org/apache/zookeeper/ServerAdminClient.java | 280 ++
.../main/java/org/apache/zookeeper/Shell.java | 480 +++
.../java/org/apache/zookeeper/StatsTrack.java | 101 +
.../java/org/apache/zookeeper/Testable.java | 29 +
.../java/org/apache/zookeeper/Transaction.java | 70 +
.../main/java/org/apache/zookeeper/Version.java | 92 +
.../apache/zookeeper/WatchDeregistration.java | 70 +
.../java/org/apache/zookeeper/WatchedEvent.java | 81 +
.../main/java/org/apache/zookeeper/Watcher.java | 201 ++
.../main/java/org/apache/zookeeper/ZKUtil.java | 171 +
.../main/java/org/apache/zookeeper/ZooDefs.java | 141 +
.../java/org/apache/zookeeper/ZooKeeper.java | 2965 ++++++++++++++++++
.../org/apache/zookeeper/ZooKeeperMain.java | 664 ++++
.../org/apache/zookeeper/ZooKeeperTestable.java | 47 +
.../apache/zookeeper/admin/ZooKeeperAdmin.java | 254 ++
.../org/apache/zookeeper/cli/AclParser.java | 81 +
.../apache/zookeeper/cli/AddAuthCommand.java | 69 +
.../org/apache/zookeeper/cli/CliCommand.java | 117 +
.../org/apache/zookeeper/cli/CliException.java | 57 +
.../apache/zookeeper/cli/CliParseException.java | 31 +
.../zookeeper/cli/CliWrapperException.java | 60 +
.../org/apache/zookeeper/cli/CloseCommand.java | 46 +
.../zookeeper/cli/CommandNotFoundException.java | 26 +
.../org/apache/zookeeper/cli/CreateCommand.java | 134 +
.../apache/zookeeper/cli/DelQuotaCommand.java | 161 +
.../apache/zookeeper/cli/DeleteAllCommand.java | 82 +
.../org/apache/zookeeper/cli/DeleteCommand.java | 91 +
.../org/apache/zookeeper/cli/GetAclCommand.java | 106 +
.../org/apache/zookeeper/cli/GetCommand.java | 98 +
.../apache/zookeeper/cli/GetConfigCommand.java | 84 +
.../apache/zookeeper/cli/ListQuotaCommand.java | 82 +
.../org/apache/zookeeper/cli/Ls2Command.java | 72 +
.../org/apache/zookeeper/cli/LsCommand.java | 137 +
.../cli/MalformedCommandException.java | 25 +
.../zookeeper/cli/MalformedPathException.java | 25 +
.../apache/zookeeper/cli/ReconfigCommand.java | 169 +
.../zookeeper/cli/RemoveWatchesCommand.java | 89 +
.../org/apache/zookeeper/cli/SetAclCommand.java | 104 +
.../org/apache/zookeeper/cli/SetCommand.java | 81 +
.../apache/zookeeper/cli/SetQuotaCommand.java | 216 ++
.../org/apache/zookeeper/cli/StatCommand.java | 95 +
.../org/apache/zookeeper/cli/StatPrinter.java | 49 +
.../org/apache/zookeeper/cli/SyncCommand.java | 74 +
.../zookeeper/client/ConnectStringParser.java | 95 +
.../zookeeper/client/FourLetterWordMain.java | 146 +
.../apache/zookeeper/client/HostProvider.java | 76 +
.../zookeeper/client/StaticHostProvider.java | 383 +++
.../apache/zookeeper/client/ZKClientConfig.java | 140 +
.../zookeeper/client/ZooKeeperSaslClient.java | 477 +++
.../common/AtomicFileOutputStream.java | 126 +
.../common/AtomicFileWritingIdiom.java | 89 +
.../apache/zookeeper/common/ClientX509Util.java | 38 +
.../org/apache/zookeeper/common/IOUtils.java | 123 +
.../org/apache/zookeeper/common/NetUtils.java | 43 +
.../org/apache/zookeeper/common/PathTrie.java | 294 ++
.../org/apache/zookeeper/common/PathUtils.java | 120 +
.../apache/zookeeper/common/QuorumX509Util.java | 32 +
.../apache/zookeeper/common/StringUtils.java | 63 +
.../java/org/apache/zookeeper/common/Time.java | 52 +
.../apache/zookeeper/common/X509Exception.java | 67 +
.../org/apache/zookeeper/common/X509Util.java | 363 +++
.../org/apache/zookeeper/common/ZKConfig.java | 280 ++
.../zookeeper/common/ZKHostnameVerifier.java | 349 +++
.../apache/zookeeper/common/ZKTrustManager.java | 150 +
.../apache/zookeeper/util/SecurityUtils.java | 298 ++
.../apache/zookeeper/version/util/VerGen.java | 169 +
.../src/main/resources/lib/cobertura/README.txt | 3 +
.../resources/lib/jdiff/zookeeper_3.1.1.xml | 2717 ++++++++++++++++
.../main/resources/lib/jline-2.11.LICENSE.txt | 35 +
.../main/resources/lib/log4j-1.2.17.LICENSE.txt | 202 ++
.../main/resources/lib/slf4j-1.7.25.LICENSE.txt | 22 +
.../apache/zookeeper/ClientCnxnSocketTest.java | 53 +
.../apache/zookeeper/ClientReconnectTest.java | 78 +
.../zookeeper/ClientRequestTimeoutTest.java | 157 +
.../zookeeper/CustomHostProviderTest.java | 79 +
.../apache/zookeeper/JUnit4ZKTestRunner.java | 110 +
.../org/apache/zookeeper/JaasConfiguration.java | 75 +
.../java/org/apache/zookeeper/MockPacket.java | 46 +
.../org/apache/zookeeper/MultiResponseTest.java | 72 +
.../zookeeper/MultiTransactionRecordTest.java | 68 +
.../org/apache/zookeeper/PortAssignment.java | 210 ++
.../apache/zookeeper/PortAssignmentTest.java | 80 +
.../apache/zookeeper/RemoveWatchesCmdTest.java | 345 ++
.../org/apache/zookeeper/RemoveWatchesTest.java | 1258 ++++++++
.../java/org/apache/zookeeper/SaslAuthTest.java | 252 ++
.../org/apache/zookeeper/ServerConfigTest.java | 74 +
.../org/apache/zookeeper/TestableZooKeeper.java | 128 +
.../java/org/apache/zookeeper/VerGenTest.java | 79 +
.../org/apache/zookeeper/ZKParameterized.java | 58 +
.../java/org/apache/zookeeper/ZKTestCase.java | 78 +
.../org/apache/zookeeper/ZooKeeperTest.java | 594 ++++
.../zookeeper/client/ZKClientConfigTest.java | 191 ++
.../common/AtomicFileWritingIdiomTest.java | 360 +++
.../apache/zookeeper/common/NetUtilsTest.java | 72 +
.../apache/zookeeper/common/PathUtilsTest.java | 129 +
.../org/apache/zookeeper/common/TimeTest.java | 109 +
.../apache/zookeeper/common/X509UtilTest.java | 264 ++
.../zookeeper/common/ZKTrustManagerTest.java | 248 ++
.../org/apache/zookeeper/test/ACLCountTest.java | 111 +
.../org/apache/zookeeper/test/ACLRootTest.java | 94 +
.../java/org/apache/zookeeper/test/ACLTest.java | 282 ++
.../apache/zookeeper/test/AsyncHammerTest.java | 244 ++
.../org/apache/zookeeper/test/AsyncOps.java | 827 +++++
.../org/apache/zookeeper/test/AsyncOpsTest.java | 271 ++
.../org/apache/zookeeper/test/AsyncTest.java | 145 +
.../test/AtomicFileOutputStreamTest.java | 200 ++
.../org/apache/zookeeper/test/AuthTest.java | 174 +
.../apache/zookeeper/test/BufferSizeTest.java | 135 +
.../apache/zookeeper/test/ChrootAsyncTest.java | 47 +
.../apache/zookeeper/test/ChrootClientTest.java | 54 +
.../org/apache/zookeeper/test/ChrootTest.java | 136 +
.../org/apache/zookeeper/test/ClientBase.java | 779 +++++
.../apache/zookeeper/test/ClientHammerTest.java | 246 ++
.../zookeeper/test/ClientPortBindTest.java | 110 +
.../apache/zookeeper/test/ClientRetryTest.java | 73 +
.../apache/zookeeper/test/ClientSSLTest.java | 132 +
.../zookeeper/test/ClientSkipACLTest.java | 34 +
.../org/apache/zookeeper/test/ClientTest.java | 870 +++++
.../apache/zookeeper/test/CnxManagerTest.java | 524 ++++
.../zookeeper/test/ConnectStringParserTest.java | 90 +
.../apache/zookeeper/test/CreateModeTest.java | 91 +
.../org/apache/zookeeper/test/CreateTest.java | 115 +
.../zookeeper/test/DisconnectableZooKeeper.java | 58 +
.../zookeeper/test/DisconnectedWatcherTest.java | 255 ++
.../test/DuplicateLocalSessionUpgradeTest.java | 113 +
.../test/EmptiedSnapshotRecoveryTest.java | 133 +
.../apache/zookeeper/test/EventTypeTest.java | 50 +
.../apache/zookeeper/test/FLENewEpochTest.java | 193 ++
.../apache/zookeeper/test/FLEPredicateTest.java | 108 +
.../apache/zookeeper/test/FLERestartTest.java | 189 ++
.../java/org/apache/zookeeper/test/FLETest.java | 537 ++++
.../zookeeper/test/FLEZeroWeightTest.java | 175 ++
.../test/FollowerResyncConcurrencyTest.java | 748 +++++
.../test/FourLetterWordsQuorumTest.java | 119 +
.../zookeeper/test/FourLetterWordsTest.java | 245 ++
.../test/FourLetterWordsWhiteListTest.java | 251 ++
.../apache/zookeeper/test/GetChildren2Test.java | 136 +
.../zookeeper/test/GetProposalFromTxnTest.java | 137 +
.../zookeeper/test/HierarchicalQuorumTest.java | 327 ++
.../apache/zookeeper/test/IntegrityCheck.java | 221 ++
.../zookeeper/test/InvalidSnapshotTest.java | 110 +
.../java/org/apache/zookeeper/test/JMXEnv.java | 322 ++
.../apache/zookeeper/test/KeeperStateTest.java | 76 +
.../zookeeper/test/KeyAuthClientTest.java | 131 +
.../test/LeaderSessionTrackerTest.java | 163 +
.../zookeeper/test/LoadFromLogNoServerTest.java | 176 ++
.../apache/zookeeper/test/LoadFromLogTest.java | 310 ++
.../zookeeper/test/LocalSessionRequestTest.java | 148 +
.../zookeeper/test/LocalSessionsOnlyTest.java | 138 +
.../apache/zookeeper/test/LogChopperTest.java | 129 +
.../org/apache/zookeeper/test/MaxCnxnsTest.java | 136 +
.../test/MultiAsyncTransactionTest.java | 135 +
.../zookeeper/test/MultiTransactionTest.java | 806 +++++
.../test/NIOConnectionFactoryFdLeakTest.java | 69 +
.../zookeeper/test/NettyNettySuiteBase.java | 49 +
.../test/NettyNettySuiteHammerTest.java | 30 +
.../zookeeper/test/NettyNettySuiteTest.java | 38 +
.../zookeeper/test/NioNettySuiteBase.java | 44 +
.../zookeeper/test/NioNettySuiteHammerTest.java | 30 +
.../zookeeper/test/NioNettySuiteTest.java | 38 +
.../zookeeper/test/NonRecoverableErrorTest.java | 185 ++
.../org/apache/zookeeper/test/NullDataTest.java | 75 +
.../java/org/apache/zookeeper/test/OOMTest.java | 162 +
.../org/apache/zookeeper/test/OSMXBeanTest.java | 71 +
.../test/ObserverHierarchicalQuorumTest.java | 39 +
.../apache/zookeeper/test/ObserverLETest.java | 76 +
.../test/ObserverQuorumHammerTest.java | 39 +
.../org/apache/zookeeper/test/ObserverTest.java | 232 ++
.../org/apache/zookeeper/test/QuorumBase.java | 436 +++
.../apache/zookeeper/test/QuorumHammerTest.java | 51 +
.../zookeeper/test/QuorumMajorityTest.java | 106 +
.../apache/zookeeper/test/QuorumQuotaTest.java | 59 +
.../org/apache/zookeeper/test/QuorumTest.java | 415 +++
.../org/apache/zookeeper/test/QuorumUtil.java | 326 ++
.../apache/zookeeper/test/QuorumUtilTest.java | 94 +
.../zookeeper/test/QuorumZxidSyncTest.java | 173 +
.../apache/zookeeper/test/ReadOnlyModeTest.java | 309 ++
.../zookeeper/test/ReconfigExceptionTest.java | 213 ++
.../zookeeper/test/ReconfigMisconfigTest.java | 129 +
.../org/apache/zookeeper/test/ReconfigTest.java | 1114 +++++++
.../org/apache/zookeeper/test/RecoveryTest.java | 209 ++
.../zookeeper/test/RepeatStartupTest.java | 69 +
.../zookeeper/test/RestoreCommittedLogTest.java | 83 +
.../org/apache/zookeeper/test/SSLAuthTest.java | 105 +
.../org/apache/zookeeper/test/SSLTest.java.orig | 130 +
.../test/SaslAuthDesignatedClientTest.java | 166 +
.../test/SaslAuthDesignatedServerTest.java | 104 +
.../test/SaslAuthFailDesignatedClientTest.java | 92 +
.../zookeeper/test/SaslAuthFailNotifyTest.java | 98 +
.../apache/zookeeper/test/SaslAuthFailTest.java | 76 +
.../test/SaslAuthMissingClientConfigTest.java | 81 +
.../apache/zookeeper/test/SaslClientTest.java | 69 +
.../zookeeper/test/SaslSuperUserTest.java | 136 +
.../apache/zookeeper/test/ServerCnxnTest.java | 129 +
.../zookeeper/test/SessionInvalidationTest.java | 105 +
.../org/apache/zookeeper/test/SessionTest.java | 412 +++
.../zookeeper/test/SessionTimeoutTest.java | 129 +
.../zookeeper/test/SessionTrackerCheckTest.java | 227 ++
.../zookeeper/test/SessionUpgradeTest.java | 232 ++
.../org/apache/zookeeper/test/SledgeHammer.java | 111 +
.../apache/zookeeper/test/StandaloneTest.java | 167 +
.../org/apache/zookeeper/test/StatTest.java | 205 ++
.../zookeeper/test/StaticHostProviderTest.java | 932 ++++++
.../apache/zookeeper/test/StringUtilTest.java | 44 +
.../org/apache/zookeeper/test/SyncCallTest.java | 122 +
.../org/apache/zookeeper/test/TestHammer.java | 61 +
.../org/apache/zookeeper/test/TestUtils.java | 60 +
.../org/apache/zookeeper/test/TruncateTest.java | 247 ++
.../test/WatchEventWhenAutoResetTest.java | 218 ++
.../apache/zookeeper/test/WatchedEventTest.java | 94 +
.../apache/zookeeper/test/WatcherFuncTest.java | 478 +++
.../org/apache/zookeeper/test/WatcherTest.java | 463 +++
.../org/apache/zookeeper/test/X509AuthTest.java | 290 ++
.../test/ZkDatabaseCorruptionTest.java | 170 +
.../zookeeper/test/ZooKeeperQuotaTest.java | 79 +
.../zookeeper/test/ZooKeeperTestClient.java | 467 +++
.../src/test/resources/check_compatibility.py | 204 ++
.../resources/checkstyle-noframes-sorted.xsl | 178 ++
.../src/test/resources/checkstyle.xml | 187 ++
.../data/buffersize/create/version-2/log.1 | Bin 0 -> 51216 bytes
.../data/buffersize/create/version-2/snapshot.0 | Bin 0 -> 296 bytes
.../data/buffersize/set/version-2/log.1 | Bin 0 -> 51216 bytes
.../data/buffersize/set/version-2/snapshot.0 | Bin 0 -> 296 bytes
.../data/buffersize/snapshot/version-2/log.1 | Bin 0 -> 51216 bytes
.../buffersize/snapshot/version-2/snapshot.0 | Bin 0 -> 296 bytes
.../buffersize/snapshot/version-2/snapshot.2 | Bin 0 -> 5429 bytes
.../resources/data/invalidsnap/version-2/log.1 | Bin 0 -> 59360 bytes
.../data/invalidsnap/version-2/log.274 | Bin 0 -> 91616 bytes
.../resources/data/invalidsnap/version-2/log.42 | Bin 0 -> 184 bytes
.../data/invalidsnap/version-2/log.63b | Bin 0 -> 49008 bytes
.../data/invalidsnap/version-2/snapshot.0 | Bin 0 -> 296 bytes
.../data/invalidsnap/version-2/snapshot.272 | Bin 0 -> 56408 bytes
.../data/invalidsnap/version-2/snapshot.273 | Bin 0 -> 56521 bytes
.../data/invalidsnap/version-2/snapshot.639 | Bin 0 -> 143163 bytes
.../data/invalidsnap/version-2/snapshot.83f | Bin 0 -> 4824 bytes
.../resources/data/kerberos/minikdc-krb5.conf | 30 +
.../test/resources/data/kerberos/minikdc.ldiff | 52 +
.../src/test/resources/data/ssl/README.md | 10 +
.../test/resources/data/ssl/testKeyStore.jks | Bin 0 -> 2250 bytes
.../test/resources/data/ssl/testTrustStore.jks | Bin 0 -> 960 bytes
.../test/resources/data/upgrade/log.100000001 | Bin 0 -> 2458624 bytes
.../test/resources/data/upgrade/log.100001bf0 | Bin 0 -> 1025024 bytes
.../resources/data/upgrade/snapshot.100000000 | Bin 0 -> 73 bytes
.../resources/data/upgrade/snapshot.100001bec | Bin 0 -> 2567595 bytes
.../src/test/resources/findbugsExcludeFile.xml | 202 ++
.../src/test/resources/test-github-pr.sh | 616 ++++
.../src/test/resources/test-patch.properties | 18 +
.../src/test/resources/test-patch.sh | 649 ++++
.../src/test/resources/test-scripts.sh | 223 ++
546 files changed, 52739 insertions(+), 52856 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 6853626..a4a083e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,8 +66,8 @@ zookeeper-client/zookeeper-client-c/*.lo
zookeeper-client/zookeeper-client-c/*.o
zookeeper-client/zookeeper-client-c/generated/
src/java/generated/
-zookeeper-common/src/main/resources/lib/ant-eclipse-*
-zookeeper-common/src/main/resources/lib/ivy-*
+zookeeper-server/src/main/resources/lib/ant-eclipse-*
+zookeeper-server/src/main/resources/lib/ivy-*
zookeeper-client/zookeeper-client-c/Makefile.in
zookeeper-client/zookeeper-client-c/aclocal.m4
zookeeper-client/zookeeper-client-c/autom4te.cache/
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/bin/zkEnv.sh
----------------------------------------------------------------------
diff --git a/bin/zkEnv.sh b/bin/zkEnv.sh
index 0f49898..d189c37 100755
--- a/bin/zkEnv.sh
+++ b/bin/zkEnv.sh
@@ -87,7 +87,7 @@ fi
#add the zoocfg dir to classpath
CLASSPATH="$ZOOCFGDIR:$CLASSPATH"
-for i in "$ZOOBINDIR"/../zookeeper-common/src/main/resources/lib/*.jar
+for i in "$ZOOBINDIR"/../zookeeper-server/src/main/resources/lib/*.jar
do
CLASSPATH="$i:$CLASSPATH"
done
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 77c50ca..8849295 100644
--- a/build.xml
+++ b/build.xml
@@ -93,13 +93,10 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="src.dir" value="${basedir}/src" />
<property name="java.server.src.dir" value="${basedir}/zookeeper-server/src/main/java" />
<property name="java.server.resources.dir" value="${basedir}/zookeeper-server/src/main/resources" />
- <property name="java.common.src.dir" value="${basedir}/zookeeper-common/src/main/java" />
- <property name="java.common.resources.dir" value="${basedir}/zookeeper-common/src/main/resources" />
- <property name="java.client.src.dir" value="${basedir}/zookeeper-client/zookeeper-client-java/src/main/java" />
<property name="jute.src.dir" value="${basedir}/zookeeper-jute/src/main/java" />
<property name="java.test.dir" value="${src.dir}/test/java"/>
- <property name="lib.dir" value="${java.common.resources.dir}/lib" />
+ <property name="lib.dir" value="${java.server.resources.dir}/lib" />
<property name="lib.dir.includes" value="**/*.jar" />
<property name="lib.dir.excludes" value="**/excluded/" />
@@ -126,9 +123,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="test.java.build.dir" value="${build.dir}/test"/>
<property name="test.java.classes" value="${test.java.build.dir}/classes"/>
<property name="java.server.test.dir" value="${basedir}/zookeeper-server/src/test/java"/>
- <property name="java.common.test.dir" value="${basedir}/zookeeper-common/src/test/java"/>
- <property name="java.client.test.dir" value="${basedir}/zookeeper-client/zookeeper-client-java/src/test/java"/>
- <property name="common.test.resource.dir" value="${basedir}/zookeeper-common/src/test/resources"/>
+ <property name="server.test.resource.dir" value="${basedir}/zookeeper-server/src/test/resources"/>
<property name="jute.test.src.dir" value="${basedir}/zookeeper-jute/src/test/java" />
<property name="systest.src.dir" value="${basedir}/zookeeper-it/src/test/java"/>
<property name="bench.src.dir" value="${basedir}/zookeeper-it/src/test/bench"/>
@@ -157,12 +152,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
value="http://docs.oracle.com/javase/6/docs/api/" />
<property name="javadoc.packages" value="org.apache.*" />
- <path id="java.src.dir">
- <pathelement path="${java.server.src.dir}"/>
- <pathelement path="${java.common.src.dir}"/>
- <pathelement path="${java.client.src.dir}"/>
- </path>
-
<property name="dist.dir" value="${build.dir}/${final.name}"/>
<property name="dist.maven.dir" value="${dist.dir}/dist-maven"/>
@@ -209,8 +198,8 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="grep.cmd" value="grep"/>
<property name="patch.cmd" value="patch"/>
<property name="make.cmd" value="make"/>
- <property name="test_patch_sh" value="${common.test.resource.dir}/test-patch.sh"/>
- <property name="test_pullrequest_sh" value="${common.test.resource.dir}/test-github-pr.sh"/>
+ <property name="test_patch_sh" value="${server.test.resource.dir}/test-patch.sh"/>
+ <property name="test_pullrequest_sh" value="${server.test.resource.dir}/test-github-pr.sh"/>
<!-- jdiff.home property set -->
<property name="jdiff.home" value="${ivy.jdiff.lib}"/>
@@ -380,7 +369,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
target="${javac.target}" source="${javac.source}"
includes="org/apache/zookeeper/version/util/**" debug="on" encoding="${build.encoding}">
<src path="${java.server.src.dir}" />
- <src path="${java.common.src.dir}" />
</javac>
</target>
@@ -513,8 +501,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<javac destdir="${build.classes}" includeantruntime="false"
target="${javac.target}" source="${javac.source}" debug="on" encoding="${build.encoding}">
<src path="${java.server.src.dir}"/>
- <src path="${java.common.src.dir}"/>
- <src path="${java.client.src.dir}"/>
<src path="${jute.src.dir}"/>
<classpath refid="java.classpath"/>
<compilerarg value="-Xlint:all"/>
@@ -527,8 +513,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<javac destdir="${test.java.classes}" includeantruntime="false"
target="${javac.target}" source="${javac.source}" debug="on" encoding="${build.encoding}">
<src path="${java.server.test.dir}"/>
- <src path="${java.common.test.dir}"/>
- <src path="${java.client.test.dir}"/>
<src path="${jute.test.src.dir}"/>
<classpath refid="test.java.classpath"/>
</javac>
@@ -609,12 +593,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<include name="org/apache/**"/>
<exclude name="org/apache/jute/**"/>
</packageset>
- <packageset dir="${java.common.src.dir}">
- <include name="org/apache/**"/>
- </packageset>
- <packageset dir="${java.client.src.dir}">
- <include name="org/apache/**"/>
- </packageset>
<packageset dir="${src_generated.dir}"/>
<link href="${javadoc.link.java}"/>
<classpath refid="java.classpath"/>
@@ -649,14 +627,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<include name="org/apache/**"/>
<exclude name="org/apache/zookeeper/server/**"/>
</packageset>
- <packageset dir="${java.common.src.dir}">
- <include name="org/apache/**"/>
- <exclude name="org/apache/zookeeper/server/**"/>
- </packageset>
- <packageset dir="${java.client.src.dir}">
- <include name="org/apache/**"/>
- <exclude name="org/apache/zookeeper/server/**"/>
- </packageset>
<packageset dir="${jute.src.dir}">
<include name="org/apache/**"/>
</packageset>
@@ -706,8 +676,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<fileset file="LICENSE.txt" />
<fileset dir="${build.classes}" excludes="**/.generated"/>
<fileset dir="${java.server.src.dir}"/>
- <fileset dir="${java.common.src.dir}"/>
- <fileset dir="${java.client.src.dir}"/>
<fileset dir="${jute.src.dir}"/>
<fileset dir="${src_generated.dir}" excludes="**/.generated"/>
<manifest>
@@ -783,8 +751,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<jar jarfile="${build.dir}/${final.name}-sources.jar">
<fileset file="LICENSE.txt" />
<fileset dir="${java.server.src.dir}"/>
- <fileset dir="${java.common.src.dir}"/>
- <fileset dir="${java.client.src.dir}"/>
<fileset dir="${jute.src.dir}"/>
<fileset dir="${src_generated.dir}" excludes="**/.generated"/>
<manifest>
@@ -938,7 +904,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<include name="zookeeper-contrib/**"/>
<include name="zookeeper-client/**"/>
<include name="zookeeper-jute/**"/>
- <include name="zookeeper-common/**"/>
<include name="zookeeper-server/**"/>
</fileset>
<fileset file="${java.server.resources.dir}/pom.template"/>
@@ -1274,19 +1239,19 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<mkdir dir="${test.data.dir}" />
<mkdir dir="${test.data.invalid.dir}" />
<copy todir="${test.data.invalid.dir}">
- <fileset dir="${common.test.resource.dir}/data/invalidsnap"/>
+ <fileset dir="${server.test.resource.dir}/data/invalidsnap"/>
</copy>
<mkdir dir="${test.data.buffersize.dir}" />
<copy todir="${test.data.buffersize.dir}">
- <fileset dir="${common.test.resource.dir}/data/buffersize"/>
+ <fileset dir="${server.test.resource.dir}/data/buffersize"/>
</copy>
<mkdir dir="${test.data.ssl.dir}" />
<copy todir="${test.data.ssl.dir}">
- <fileset dir="${common.test.resource.dir}/data/ssl"/>
+ <fileset dir="${server.test.resource.dir}/data/ssl"/>
</copy>
<mkdir dir="${test.data.kerberos.dir}" />
<copy todir="${test.data.kerberos.dir}">
- <fileset dir="${common.test.resource.dir}/data/kerberos"/>
+ <fileset dir="${server.test.resource.dir}/data/kerberos"/>
</copy>
</target>
@@ -1331,37 +1296,17 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<path refid="test.java.classpath" />
<pathelement path="${test.java.classes}" />
</path>
- <fileset id="quicktest.files.common" dir="${java.common.test.dir}">
- <include name="**/*${test.category}Test.java" />
- <exclude name="**/*HammerTest.java" />
- </fileset>
- <fileset id="quicktest.files.server" dir="${java.server.test.dir}">
- <include name="**/*${test.category}Test.java" />
- <exclude name="**/*HammerTest.java" />
- </fileset>
- <fileset id="quicktest.files.client" dir="${java.client.test.dir}">
+ <fileset id="quicktest.files" dir="${java.server.test.dir}">
<include name="**/*${test.category}Test.java" />
<exclude name="**/*HammerTest.java" />
</fileset>
<fileset id="jutetest.files" dir="${jute.test.src.dir}">
<include name="**/*${test.category}Test.java" />
</fileset>
- <fileset id="fulltest.files.common" dir="${java.common.test.dir}">
- <include name="**/*${test.category}Test.java" />
- </fileset>
- <fileset id="fulltest.files.server" dir="${java.server.test.dir}">
- <include name="**/*${test.category}Test.java" />
- </fileset>
- <fileset id="fulltest.files.client" dir="${java.client.test.dir}">
+ <fileset id="fulltest.files" dir="${java.server.test.dir}">
<include name="**/*${test.category}Test.java" />
</fileset>
- <fileset id="testcase.files.common" dir="${java.common.test.dir}">
- <include name="**/${testcase}.java" />
- </fileset>
- <fileset id="testcase.files.server" dir="${java.server.test.dir}">
- <include name="**/${testcase}.java" />
- </fileset>
- <fileset id="testcase.files.client" dir="${java.client.test.dir}">
+ <fileset id="testcase.files" dir="${java.server.test.dir}">
<include name="**/${testcase}.java" />
</fileset>
</target>
@@ -1384,21 +1329,15 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<classpath refid="junit.classpath" />
<formatter type="${test.junit.output.format}" />
<batchtest todir="${test.log.dir}" if="quicktest">
- <fileset refid="quicktest.files.common" />
- <fileset refid="quicktest.files.server" />
- <fileset refid="quicktest.files.client" />
+ <fileset refid="quicktest.files" />
<fileset refid="jutetest.files" />
</batchtest>
<batchtest todir="${test.log.dir}" if="fulltest">
- <fileset refid="fulltest.files.common" />
- <fileset refid="fulltest.files.server" />
- <fileset refid="fulltest.files.client" />
+ <fileset refid="fulltest.files" />
<fileset refid="jutetest.files" />
</batchtest>
<batchtest todir="${test.log.dir}" if="testcase">
- <fileset refid="testcase.files.common" />
- <fileset refid="testcase.files.server" />
- <fileset refid="testcase.files.client" />
+ <fileset refid="testcase.files" />
</batchtest>
</junit>
<antcall target="fail.build.on.test.failure"/>
@@ -1422,21 +1361,15 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<classpath refid="junit.classpath" />
<formatter type="${test.junit.output.format}" />
<batchtest todir="${test.log.dir}" if="quicktest">
- <fileset refid="quicktest.files.common" />
- <fileset refid="quicktest.files.server" />
- <fileset refid="quicktest.files.client" />
+ <fileset refid="quicktest.files" />
<fileset refid="jutetest.files" />
</batchtest>
<batchtest todir="${test.log.dir}" if="fulltest">
- <fileset refid="fulltest.files.common" />
- <fileset refid="fulltest.files.server" />
- <fileset refid="fulltest.files.client" />
+ <fileset refid="fulltest.files" />
<fileset refid="jutetest.files" />
</batchtest>
<batchtest todir="${test.log.dir}" if="testcase">
- <fileset refid="testcase.files.common" />
- <fileset refid="testcase.files.server" />
- <fileset refid="testcase.files.client" />
+ <fileset refid="testcase.files" />
</batchtest>
</junit>
<antcall target="fail.build.on.test.failure"/>
@@ -1603,29 +1536,11 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
includes="org/apache/zookeeper/**/*"
excludes="org/apache/zookeeper/version/**/*">
</fileset>
- <fileset dir="${java.common.src.dir}"
- includes="org/apache/zookeeper/**/*"
- excludes="org/apache/zookeeper/version/**/*">
- </fileset>
- <fileset dir="${java.client.src.dir}"
- includes="org/apache/zookeeper/**/*"
- excludes="org/apache/zookeeper/version/**/*">
- </fileset>
<testsources dir="${java.server.test.dir}">
<testclass package="org.apache.zookeeper.*" name=".*Test">
<testmethod annotation="Test"/>
</testclass>
</testsources>
- <testsources dir="${java.common.test.dir}">
- <testclass package="org.apache.zookeeper.*" name=".*Test">
- <testmethod annotation="Test"/>
- </testclass>
- </testsources>
- <testsources dir="${java.client.test.dir}">
- <testclass package="org.apache.zookeeper.*" name=".*Test">
- <testmethod annotation="Test"/>
- </testclass>
- </testsources>
</clover-setup>
</target>
@@ -1672,7 +1587,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="findbugs.home" value="" />
<target name="findbugs" depends="check-for-findbugs, jar" if="findbugs.present">
<property name="findbugs.out.dir" value="${test.java.build.dir}/findbugs" />
- <property name="findbugs.exclude.file" value="${common.test.resource.dir}/findbugsExcludeFile.xml" />
+ <property name="findbugs.exclude.file" value="${server.test.resource.dir}/findbugsExcludeFile.xml" />
<property name="findbugs.report.htmlfile" value="${findbugs.out.dir}/zookeeper-findbugs-report.html" />
<property name="findbugs.report.xmlfile" value="${findbugs.out.dir}/zookeeper-findbugs-report.xml" />
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
@@ -1686,8 +1601,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
</fileset>
</auxClasspath>
<sourcePath path="${java.server.src.dir}" />
- <sourcePath path="${java.common.src.dir}" />
- <sourcePath path="${java.client.src.dir}" />
<class location="${build.dir}/${final.name}.jar" />
</findbugs>
<xslt style="${findbugs.home}/src/xsl/default.xsl" in="${findbugs.report.xmlfile}"
@@ -1753,17 +1666,11 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<formatter type="${test.junit.output.format}" />
<batchtest todir="${test.log.dir}" unless="testcase">
- <fileset dir="${java.common.test.dir}"
- includes="**/*Test.java"/>
<fileset dir="${java.server.test.dir}"
includes="**/*Test.java"/>
- <fileset dir="${java.client.test.dir}"
- includes="**/*Test.java"/>
</batchtest>
<batchtest todir="${test.log.dir}" if="testcase">
- <fileset dir="${java.common.test.dir}" includes="**/${testcase}.java"/>
<fileset dir="${java.server.test.dir}" includes="**/${testcase}.java"/>
- <fileset dir="${java.client.test.dir}" includes="**/${testcase}.java"/>
</batchtest>
</junit>
<antcall target="fail.build.on.test.failure"/>
@@ -1775,12 +1682,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<fileset dir="${java.server.src.dir}">
<include name="**/*.java" />
</fileset>
- <fileset dir="${java.common.src.dir}">
- <include name="**/*.java" />
- </fileset>
- <fileset dir="${java.client.src.dir}">
- <include name="**/*.java" />
- </fileset>
<fileset dir="${src_generated.dir}">
<include name="**/*.java" />
</fileset>
@@ -1794,13 +1695,11 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
</classpath>
</taskdef>
<mkdir dir="${test.java.build.dir}"/>
- <cs:checkstyle config="${common.test.resource.dir}/checkstyle.xml" failOnViolation="false">
- <fileset dir="${basedir}/zookeeper-common" includes="**/*.java" excludes="**/generated/**"/>
- <fileset dir="${basedir}/zookeeper-client" includes="**/*.java" excludes="**/generated/**"/>
+ <cs:checkstyle config="${server.test.resource.dir}/checkstyle.xml" failOnViolation="false">
<fileset dir="${basedir}/zookeeper-server" includes="**/*.java" excludes="**/generated/**"/>
<formatter type="xml" toFile="${test.java.build.dir}/checkstyle-errors.xml"/>
</cs:checkstyle>
- <xslt style="${common.test.resource.dir}/checkstyle-noframes-sorted.xsl" in="${test.java.build.dir}/checkstyle-errors.xml"
+ <xslt style="${server.test.resource.dir}/checkstyle-noframes-sorted.xsl" in="${test.java.build.dir}/checkstyle-errors.xml"
out="${test.java.build.dir}/checkstyle-errors.html"/>
</target>
@@ -1899,9 +1798,9 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<exclude name="src/zookeeper-contrib/zookeeper-contrib-zooinspector/src/main/java/com/nitido/utils/toaster/Toaster.java"/>
<exclude name="src/zookeeper-contrib/zookeeper-contrib-fatjar/src/main/resources/mainClasses"/>
<exclude name="src/zookeeper-jute/target/main/java/.generated/"/>
- <exclude name="src/zookeeper-common/src/test/resources/checkstyle*.xml"/>
- <exclude name="src/zookeeper-common/src/test/resources/checkstyle*.xsl"/>
- <exclude name="src/zookeeper-common/src/test/resources/findbugs*.xml"/>
+ <exclude name="src/zookeeper-server/src/test/resources/checkstyle*.xml"/>
+ <exclude name="src/zookeeper-server/src/test/resources/checkstyle*.xsl"/>
+ <exclude name="src/zookeeper-server/src/test/resources/findbugs*.xml"/>
<exclude name="src/**/*.vcproj"/>
<exclude name="src/**/*.vcxproj*"/>
<exclude name="src/**/*.sln"/>
@@ -1990,12 +1889,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<include name="org/apache/zookeeper"/>
<exclude name="org/apache/jute"/>
</packageset>
- <packageset dir="${java.common.src.dir}">
- <include name="org/apache/zookeeper"/>
- </packageset>
- <packageset dir="${java.client.src.dir}">
- <include name="org/apache/zookeeper"/>
- </packageset>
<classpath>
<pathelement location="${build.classes}"/>
<fileset dir="${lib.dir}">
@@ -2021,8 +1914,6 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
excludepackagenames="org.apache.jute"
sourceFiles="${jdiff.home}/Null.java">
<fileset dir="${java.server.src.dir}"/>
- <fileset dir="${java.common.src.dir}"/>
- <fileset dir="${java.client.src.dir}"/>
<doclet name="jdiff.JDiff"
path="${ivy.jdiff.lib}/jdiff-1.0.9.jar:${ivy.jdiff.lib}/xerces-1.4.4.jar">
<param name="-oldapi" value="${name} ${jdiff.stable}"/>
@@ -2052,19 +1943,19 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<target name="ant-eclipse-download" unless="ant-eclipse.jar.exists">
<get src="https://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2"
- dest="${java.common.resources.dir}/ant-eclipse-1.0.bin.tar.bz2" usetimestamp="false" />
+ dest="${java.server.resources.dir}/ant-eclipse-1.0.bin.tar.bz2" usetimestamp="false" />
- <bunzip2 src="${java.common.resources.dir}/ant-eclipse-1.0.bin.tar.bz2"/>
+ <bunzip2 src="${java.server.resources.dir}/ant-eclipse-1.0.bin.tar.bz2"/>
- <untar src="${java.common.resources.dir}/ant-eclipse-1.0.bin.tar"
- dest="${java.common.resources.dir}">
+ <untar src="${java.server.resources.dir}/ant-eclipse-1.0.bin.tar"
+ dest="${java.server.resources.dir}">
<patternset>
<include name="lib/ant-eclipse-1.0-jvm1.2.jar"/>
</patternset>
</untar>
- <delete file="${java.common.resources.dir}/ant-eclipse-1.0.bin.tar" />
- <delete file="${java.common.resources.dir}/ant-eclipse-1.0.bin.tar.bz2" />
+ <delete file="${java.server.resources.dir}/ant-eclipse-1.0.bin.tar" />
+ <delete file="${java.server.resources.dir}/ant-eclipse-1.0.bin.tar.bz2" />
</target>
<target name="eclipse"
@@ -2085,20 +1976,12 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<classpath>
<source path="${java.server.src.dir}"
output="${build.dir.eclipse-main-classes}" />
- <source path="${java.common.src.dir}"
- output="${build.dir.eclipse-main-classes}" />
- <source path="${java.client.src.dir}"
- output="${build.dir.eclipse-main-classes}" />
<source path="${jute.src.dir}"
output="${build.dir.eclipse-main-classes}" />
<source path="${src_generated.dir}"
output="${build.dir.eclipse-main-classes}" />
- <source path="${java.common.test.dir}"
- output="${build.dir.eclipse-test-classes}" />
<source path="${java.server.test.dir}"
output="${build.dir.eclipse-test-classes}" />
- <source path="${java.client.test.dir}"
- output="${build.dir.eclipse-test-classes}" />
<source path="${systest.src.dir}"
output="${build.dir.eclipse-test-classes}" />
<source path="${bench.src.dir}"
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/docs/zookeeperReconfig.html
----------------------------------------------------------------------
diff --git a/docs/zookeeperReconfig.html b/docs/zookeeperReconfig.html
index 89cf285..53ef1fb 100644
--- a/docs/zookeeperReconfig.html
+++ b/docs/zookeeperReconfig.html
@@ -992,7 +992,7 @@ String configStr = new String(config);
System.out.println(configStr);</pre>
<p>There is also an asynchronous API, and an API accepting comma
separated Strings instead of List<String>. See
- zookeeper-common/src/main/java/org/apache/zookeeper/ZooKeeper.java.</p>
+ zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java.</p>
<a name="sc_reconfig_nonincremental"></a>
<h4>Non-incremental mode</h4>
<p>The second mode of reconfiguration is non-incremental, whereby a
@@ -1023,7 +1023,7 @@ System.out.println(configStr);</pre>
<p>There is also an asynchronous API, and an API accepting comma
separated String containing the new members instead of
List<String>. See
- zookeeper-common/src/main/java/org/apache/zookeeper/ZooKeeper.java.</p>
+ zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java.</p>
<a name="sc_reconfig_conditional"></a>
<h4>Conditional reconfig</h4>
<p>Sometimes (especially in non-incremental mode) a new proposed
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/zookeeper-client/zookeeper-client-c/tests/zkServer.sh
----------------------------------------------------------------------
diff --git a/zookeeper-client/zookeeper-client-c/tests/zkServer.sh b/zookeeper-client/zookeeper-client-c/tests/zkServer.sh
index cd8d7bb..d13d462 100755
--- a/zookeeper-client/zookeeper-client-c/tests/zkServer.sh
+++ b/zookeeper-client/zookeeper-client-c/tests/zkServer.sh
@@ -90,7 +90,7 @@ do
CLASSPATH="$CLASSPATH:$i"
done
-for i in "${zk_base}"/zookeeper-common/src/main/resource/lib/*.jar
+for i in "${zk_base}"/zookeeper-server/src/main/resource/lib/*.jar
do
CLASSPATH="$CLASSPATH:$i"
done
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java
----------------------------------------------------------------------
diff --git a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java
deleted file mode 100644
index 1bdff96..0000000
--- a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/ConnectStringParser.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.zookeeper.client;
-
-import org.apache.zookeeper.common.PathUtils;
-import org.apache.zookeeper.server.quorum.QuorumPeerConfig.ConfigException;
-import org.apache.zookeeper.server.util.ConfigUtils;
-
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.apache.zookeeper.common.StringUtils.split;
-
-/**
- * A parser for ZooKeeper Client connect strings.
- *
- * This class is not meant to be seen or used outside of ZooKeeper itself.
- *
- * The chrootPath member should be replaced by a Path object in issue
- * ZOOKEEPER-849.
- *
- * @see org.apache.zookeeper.ZooKeeper
- */
-public final class ConnectStringParser {
- private static final int DEFAULT_PORT = 2181;
-
- private final String chrootPath;
-
- private final ArrayList<InetSocketAddress> serverAddresses = new ArrayList<InetSocketAddress>();
-
- /**
- * Parse host and port by spliting client connectString
- * with support for IPv6 literals
- * @throws IllegalArgumentException
- * for an invalid chroot path.
- */
- public ConnectStringParser(String connectString) {
- // parse out chroot, if any
- int off = connectString.indexOf('/');
- if (off >= 0) {
- String chrootPath = connectString.substring(off);
- // ignore "/" chroot spec, same as null
- if (chrootPath.length() == 1) {
- this.chrootPath = null;
- } else {
- PathUtils.validatePath(chrootPath);
- this.chrootPath = chrootPath;
- }
- connectString = connectString.substring(0, off);
- } else {
- this.chrootPath = null;
- }
-
- List<String> hostsList = split(connectString,",");
- for (String host : hostsList) {
- int port = DEFAULT_PORT;
- try {
- String[] hostAndPort = ConfigUtils.getHostAndPort(host);
- host = hostAndPort[0];
- if (hostAndPort.length == 2) {
- port = Integer.parseInt(hostAndPort[1]);
- }
- } catch (ConfigException e) {
- e.printStackTrace();
- }
-
- serverAddresses.add(InetSocketAddress.createUnresolved(host, port));
- }
- }
-
- public String getChrootPath() {
- return chrootPath;
- }
-
- public ArrayList<InetSocketAddress> getServerAddresses() {
- return serverAddresses;
- }
-}
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/FourLetterWordMain.java
----------------------------------------------------------------------
diff --git a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/FourLetterWordMain.java b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/FourLetterWordMain.java
deleted file mode 100644
index 41f5e9d..0000000
--- a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/FourLetterWordMain.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.zookeeper.client;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSocket;
-import javax.net.ssl.SSLSocketFactory;
-
-import org.apache.zookeeper.common.ClientX509Util;
-import org.apache.yetus.audience.InterfaceAudience;
-import org.apache.zookeeper.common.X509Exception.SSLContextException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@InterfaceAudience.Public
-public class FourLetterWordMain {
- //in milliseconds, socket should connect/read within this period otherwise SocketTimeoutException
- private static final int DEFAULT_SOCKET_TIMEOUT = 5000;
- protected static final Logger LOG = LoggerFactory.getLogger(FourLetterWordMain.class);
- /**
- * Send the 4letterword
- * @param host the destination host
- * @param port the destination port
- * @param cmd the 4letterword
- * @return server response
- * @throws java.io.IOException
- * @throws SSLContextException
- */
- public static String send4LetterWord(String host, int port, String cmd)
- throws IOException, SSLContextException {
- return send4LetterWord(host, port, cmd, false, DEFAULT_SOCKET_TIMEOUT);
- }
-
- /**
- * Send the 4letterword
- * @param host the destination host
- * @param port the destination port
- * @param cmd the 4letterword
- * @param secure whether to use SSL
- * @return server response
- * @throws java.io.IOException
- * @throws SSLContextException
- */
- public static String send4LetterWord(String host, int port, String cmd, boolean secure)
- throws IOException, SSLContextException {
- return send4LetterWord(host, port, cmd, secure, DEFAULT_SOCKET_TIMEOUT);
- }
-
- /**
- * Send the 4letterword
- * @param host the destination host
- * @param port the destination port
- * @param cmd the 4letterword
- * @param secure whether to use SSL
- * @param timeout in milliseconds, maximum time to wait while connecting/reading data
- * @return server response
- * @throws java.io.IOException
- * @throws SSLContextException
- */
- public static String send4LetterWord(String host, int port, String cmd, boolean secure, int timeout)
- throws IOException, SSLContextException {
- LOG.info("connecting to {} {}", host, port);
- Socket sock;
- InetSocketAddress hostaddress= host != null ? new InetSocketAddress(host, port) :
- new InetSocketAddress(InetAddress.getByName(null), port);
- if (secure) {
- LOG.info("using secure socket");
- SSLContext sslContext = new ClientX509Util().getDefaultSSLContext();
- SSLSocketFactory socketFactory = sslContext.getSocketFactory();
- SSLSocket sslSock = (SSLSocket) socketFactory.createSocket();
- sslSock.connect(hostaddress, timeout);
- sslSock.startHandshake();
- sock = sslSock;
- } else {
- sock = new Socket();
- sock.connect(hostaddress, timeout);
- }
- sock.setSoTimeout(timeout);
- BufferedReader reader = null;
- try {
- OutputStream outstream = sock.getOutputStream();
- outstream.write(cmd.getBytes());
- outstream.flush();
-
- // this replicates NC - close the output stream before reading
- if (!secure) {
- // SSL prohibits unilateral half-close
- sock.shutdownOutput();
- }
-
- reader =
- new BufferedReader(
- new InputStreamReader(sock.getInputStream()));
- StringBuilder sb = new StringBuilder();
- String line;
- while((line = reader.readLine()) != null) {
- sb.append(line + "\n");
- }
- return sb.toString();
- } catch (SocketTimeoutException e) {
- throw new IOException("Exception while executing four letter word: " + cmd, e);
- } finally {
- sock.close();
- if (reader != null) {
- reader.close();
- }
- }
- }
-
- public static void main(String[] args)
- throws IOException, SSLContextException
- {
- if (args.length == 3) {
- System.out.println(send4LetterWord(args[0], Integer.parseInt(args[1]), args[2]));
- } else if (args.length == 4) {
- System.out.println(send4LetterWord(args[0], Integer.parseInt(args[1]), args[2], Boolean.parseBoolean(args[3])));
- } else {
- System.out.println("Usage: FourLetterWordMain <host> <port> <cmd> <secure(optional)>");
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zookeeper/blob/cb9f303b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/HostProvider.java
----------------------------------------------------------------------
diff --git a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/HostProvider.java b/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/HostProvider.java
deleted file mode 100644
index caeedcc..0000000
--- a/zookeeper-client/zookeeper-client-java/src/main/java/org/apache/zookeeper/client/HostProvider.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.zookeeper.client;
-
-import org.apache.yetus.audience.InterfaceAudience;
-
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.util.Collection;
-
-/**
- * A set of hosts a ZooKeeper client should connect to.
- *
- * Classes implementing this interface must guarantee the following:
- *
- * * Every call to next() returns an InetSocketAddress. So the iterator never
- * ends.
- *
- * * The size() of a HostProvider may never be zero.
- *
- * A HostProvider must return resolved InetSocketAddress instances on next() if the next address is resolvable.
- * In that case, it's up to the HostProvider, whether it returns the next resolvable address in the list or return
- * the next one as UnResolved.
- *
- * Different HostProvider could be imagined:
- *
- * * A HostProvider that loads the list of Hosts from an URL or from DNS
- * * A HostProvider that re-resolves the InetSocketAddress after a timeout.
- * * A HostProvider that prefers nearby hosts.
- */
-@InterfaceAudience.Public
-public interface HostProvider {
- public int size();
-
- /**
- * The next host to try to connect to.
- *
- * For a spinDelay of 0 there should be no wait.
- *
- * @param spinDelay
- * Milliseconds to wait if all hosts have been tried once.
- */
- public InetSocketAddress next(long spinDelay);
-
- /**
- * Notify the HostProvider of a successful connection.
- *
- * The HostProvider may use this notification to reset it's inner state.
- */
- public void onConnected();
-
- /**
- * Update the list of servers. This returns true if changing connections is necessary for load-balancing, false otherwise.
- * @param serverAddresses new host list
- * @param currentHost the host to which this client is currently connected
- * @return true if changing connections is necessary for load-balancing, false otherwise
- */
- boolean updateServerList(Collection<InetSocketAddress> serverAddresses,
- InetSocketAddress currentHost);
-}