You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@distributedlog.apache.org by si...@apache.org on 2017/06/12 15:45:37 UTC
[30/30] incubator-distributedlog git commit: DL-205: Remove
StatusCode dependency on DLException
DL-205: Remove StatusCode dependency on DLException
- Remove StatusCode from exceptions. Use integer as exception codes.
- Also re-organize the modules:
- [ ] distributedlog-protocol (for core structures) and distributedlog-core (for core library).
- [ ] proxy: distributedlog-proxy-protocol (new module for thrift generated protocol), distributedlog-proxy-client (proxy client) and distributedlog-proxy-server (proxy server)
- [ ] benchmark & tutorials.
Author: Sijie Guo <si...@apache.org>
Reviewers: Jia Zhai <None>, Leigh Stewart <ls...@apache.org>
Closes #131 from sijie/new_layout
Project: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/commit/c44e0278
Tree: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/tree/c44e0278
Diff: http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/diff/c44e0278
Branch: refs/heads/master
Commit: c44e0278ececde1942d5c43b06c7a12d375974a8
Parents: 52c0eef
Author: Sijie Guo <si...@apache.org>
Authored: Mon Jun 12 08:45:01 2017 -0700
Committer: Sijie Guo <si...@apache.org>
Committed: Mon Jun 12 08:45:01 2017 -0700
----------------------------------------------------------------------
distributedlog-benchmark/pom.xml | 2 +-
.../distributedlog/benchmark/WriterWorker.java | 3 +-
distributedlog-client/pom.xml | 172 ---
.../distributedlog/client/ClientConfig.java | 187 ---
.../client/DistributedLogClientImpl.java | 1200 ------------------
.../client/DistributedLogMultiStreamWriter.java | 486 -------
.../client/monitor/MonitorServiceClient.java | 68 -
.../client/monitor/package-info.java | 21 -
.../client/ownership/OwnershipCache.java | 235 ----
.../client/ownership/package-info.java | 21 -
.../distributedlog/client/package-info.java | 21 -
.../client/proxy/ClusterClient.java | 51 -
.../client/proxy/HostProvider.java | 35 -
.../client/proxy/ProxyClient.java | 165 ---
.../client/proxy/ProxyClientManager.java | 362 ------
.../client/proxy/ProxyListener.java | 50 -
.../client/proxy/package-info.java | 21 -
.../client/resolver/DefaultRegionResolver.java | 85 --
.../client/resolver/RegionResolver.java | 43 -
.../client/resolver/package-info.java | 21 -
.../routing/ConsistentHashRoutingService.java | 500 --------
.../client/routing/NameServerSet.java | 263 ----
.../client/routing/RegionsRoutingService.java | 192 ---
.../client/routing/RoutingService.java | 206 ---
.../client/routing/RoutingServiceProvider.java | 39 -
.../client/routing/RoutingUtils.java | 88 --
.../client/routing/ServerSetRoutingService.java | 274 ----
.../client/routing/ServerSetWatcher.java | 71 --
.../routing/SingleHostRoutingService.java | 128 --
.../distributedlog/client/routing/TestName.java | 49 -
.../client/routing/TwitterServerSetWatcher.java | 83 --
.../client/routing/package-info.java | 21 -
.../client/serverset/DLZkServerSet.java | 91 --
.../client/serverset/package-info.java | 21 -
...efaultSpeculativeRequestExecutionPolicy.java | 119 --
.../SpeculativeRequestExecutionPolicy.java | 34 -
.../speculative/SpeculativeRequestExecutor.java | 33 -
.../client/speculative/package-info.java | 21 -
.../client/stats/ClientStats.java | 108 --
.../client/stats/ClientStatsLogger.java | 91 --
.../distributedlog/client/stats/OpStats.java | 82 --
.../client/stats/OpStatsLogger.java | 50 -
.../client/stats/OwnershipStatsLogger.java | 115 --
.../client/stats/package-info.java | 21 -
.../distributedlog/service/DLSocketAddress.java | 161 ---
.../service/DistributedLogClient.java | 108 --
.../service/DistributedLogClientBuilder.java | 608 ---------
.../distributedlog/service/package-info.java | 21 -
.../src/main/resources/findbugsExclude.xml | 23 -
.../TestDistributedLogMultiStreamWriter.java | 383 ------
.../client/ownership/TestOwnershipCache.java | 207 ---
.../proxy/MockDistributedLogServices.java | 144 ---
.../client/proxy/MockProxyClientBuilder.java | 49 -
.../client/proxy/MockThriftClient.java | 32 -
.../client/proxy/TestProxyClientManager.java | 368 ------
.../TestConsistentHashRoutingService.java | 417 ------
.../client/routing/TestInetNameResolution.java | 73 --
.../routing/TestRegionsRoutingService.java | 133 --
.../client/routing/TestRoutingService.java | 146 ---
...efaultSpeculativeRequestExecutionPolicy.java | 105 --
.../TestDistributedLogClientBuilder.java | 49 -
.../src/test/resources/log4j.properties | 51 -
.../distributedlog/exceptions/ZKException.java | 1 -
distributedlog-protocol/pom.xml | 45 +-
.../exceptions/AlreadyClosedException.java | 2 -
.../AlreadyTruncatedTransactionException.java | 2 -
.../exceptions/BKTransmitException.java | 2 -
.../exceptions/ChecksumFailedException.java | 2 -
.../exceptions/DLClientClosedException.java | 2 -
.../distributedlog/exceptions/DLException.java | 35 +-
.../exceptions/DLIllegalStateException.java | 2 -
.../exceptions/DLInterruptedException.java | 2 -
.../exceptions/EndOfLogSegmentException.java | 2 -
.../exceptions/EndOfStreamException.java | 2 -
.../exceptions/FlushException.java | 2 -
.../exceptions/InternalServerException.java | 2 -
.../InvalidEnvelopedEntryException.java | 2 -
.../exceptions/InvalidStreamNameException.java | 2 -
.../exceptions/LockingException.java | 6 +-
.../exceptions/LogEmptyException.java | 2 -
.../exceptions/LogExistsException.java | 2 -
.../exceptions/LogNotFoundException.java | 2 -
.../exceptions/LogReadException.java | 2 -
.../exceptions/LogRecordTooLongException.java | 2 -
.../LogSegmentIsTruncatedException.java | 2 -
.../exceptions/LogSegmentNotFoundException.java | 2 -
.../exceptions/MetadataException.java | 2 -
.../exceptions/NotYetImplementedException.java | 2 -
.../exceptions/OverCapacityException.java | 4 +-
.../OwnershipAcquireFailedException.java | 2 -
.../exceptions/ReadCancelledException.java | 2 -
.../exceptions/RegionUnavailableException.java | 2 -
.../exceptions/RequestDeniedException.java | 2 -
.../exceptions/RetryableReadException.java | 2 -
.../exceptions/ServiceUnavailableException.java | 2 -
.../distributedlog/exceptions/StatusCode.java | 122 ++
.../exceptions/StreamNotReadyException.java | 2 -
.../exceptions/StreamUnavailableException.java | 2 -
.../exceptions/TooManyStreamsException.java | 2 -
.../TransactionIdOutOfOrderException.java | 2 -
.../exceptions/UnexpectedException.java | 2 -
.../UnsupportedMetadataVersionException.java | 2 -
.../exceptions/WriteCancelledException.java | 2 -
.../exceptions/WriteException.java | 2 -
.../distributedlog/util/ProtocolUtils.java | 79 --
.../src/main/resources/findbugsExclude.xml | 4 -
.../src/main/thrift/service.thrift | 203 ---
distributedlog-proxy-client/pom.xml | 172 +++
.../distributedlog/client/ClientConfig.java | 187 +++
.../client/DistributedLogClientImpl.java | 1199 +++++++++++++++++
.../client/DistributedLogMultiStreamWriter.java | 486 +++++++
.../client/monitor/MonitorServiceClient.java | 68 +
.../client/monitor/package-info.java | 21 +
.../client/ownership/OwnershipCache.java | 235 ++++
.../client/ownership/package-info.java | 21 +
.../distributedlog/client/package-info.java | 21 +
.../client/proxy/ClusterClient.java | 51 +
.../client/proxy/HostProvider.java | 35 +
.../client/proxy/ProxyClient.java | 165 +++
.../client/proxy/ProxyClientManager.java | 362 ++++++
.../client/proxy/ProxyListener.java | 50 +
.../client/proxy/package-info.java | 21 +
.../client/resolver/DefaultRegionResolver.java | 85 ++
.../client/resolver/RegionResolver.java | 43 +
.../client/resolver/package-info.java | 21 +
.../routing/ConsistentHashRoutingService.java | 500 ++++++++
.../client/routing/NameServerSet.java | 263 ++++
.../client/routing/RegionsRoutingService.java | 192 +++
.../client/routing/RoutingService.java | 206 +++
.../client/routing/RoutingServiceProvider.java | 39 +
.../client/routing/RoutingUtils.java | 88 ++
.../client/routing/ServerSetRoutingService.java | 274 ++++
.../client/routing/ServerSetWatcher.java | 71 ++
.../routing/SingleHostRoutingService.java | 128 ++
.../distributedlog/client/routing/TestName.java | 49 +
.../client/routing/TwitterServerSetWatcher.java | 83 ++
.../client/routing/package-info.java | 21 +
.../client/serverset/DLZkServerSet.java | 91 ++
.../client/serverset/package-info.java | 21 +
...efaultSpeculativeRequestExecutionPolicy.java | 119 ++
.../SpeculativeRequestExecutionPolicy.java | 34 +
.../speculative/SpeculativeRequestExecutor.java | 33 +
.../client/speculative/package-info.java | 21 +
.../client/stats/ClientStats.java | 108 ++
.../client/stats/ClientStatsLogger.java | 91 ++
.../distributedlog/client/stats/OpStats.java | 82 ++
.../client/stats/OpStatsLogger.java | 50 +
.../client/stats/OwnershipStatsLogger.java | 115 ++
.../client/stats/package-info.java | 21 +
.../distributedlog/service/DLSocketAddress.java | 161 +++
.../service/DistributedLogClient.java | 108 ++
.../service/DistributedLogClientBuilder.java | 608 +++++++++
.../distributedlog/service/package-info.java | 21 +
.../src/main/resources/findbugsExclude.xml | 23 +
.../TestDistributedLogMultiStreamWriter.java | 383 ++++++
.../client/ownership/TestOwnershipCache.java | 207 +++
.../proxy/MockDistributedLogServices.java | 144 +++
.../client/proxy/MockProxyClientBuilder.java | 49 +
.../client/proxy/MockThriftClient.java | 32 +
.../client/proxy/TestProxyClientManager.java | 368 ++++++
.../TestConsistentHashRoutingService.java | 417 ++++++
.../client/routing/TestInetNameResolution.java | 73 ++
.../routing/TestRegionsRoutingService.java | 133 ++
.../client/routing/TestRoutingService.java | 146 +++
...efaultSpeculativeRequestExecutionPolicy.java | 105 ++
.../TestDistributedLogClientBuilder.java | 49 +
.../src/test/resources/log4j.properties | 51 +
distributedlog-proxy-protocol/pom.xml | 130 ++
.../protocol/util/ProtocolUtils.java | 104 ++
.../protocol/util/package-info.java | 21 +
.../src/main/resources/findbugsExclude.xml | 23 +
.../src/main/thrift/service.thrift | 203 +++
distributedlog-proxy-server/bin/bundle | 28 +
distributedlog-proxy-server/bin/common.sh | 124 ++
distributedlog-proxy-server/bin/dlog | 88 ++
distributedlog-proxy-server/bin/dlog-daemon.sh | 200 +++
distributedlog-proxy-server/bin/dlog-env.sh | 35 +
distributedlog-proxy-server/bin/dlog-start.sh | 34 +
.../bin/zk-server-start.sh | 44 +
.../conf/bookie.conf.template | 183 +++
.../conf/distributedlog.conf | 125 ++
distributedlog-proxy-server/conf/dlogenv.sh | 75 ++
.../conf/log4j.properties | 60 +
.../conf/write_proxy.conf | 143 +++
.../conf/zookeeper.conf.template | 82 ++
distributedlog-proxy-server/pom.xml | 275 ++++
.../stats/CodahaleMetricsServletProvider.java | 63 +
.../HealthCheckServletContextListener.java | 38 +
.../stats/MetricsServletContextListener.java | 38 +
.../bookkeeper/stats/ServletReporter.java | 62 +
.../apache/bookkeeper/stats/package-info.java | 21 +
.../distributedlog/service/ClientUtils.java | 33 +
.../service/DistributedLogCluster.java | 352 +++++
.../service/DistributedLogServer.java | 460 +++++++
.../service/DistributedLogServerApp.java | 187 +++
.../service/DistributedLogServiceImpl.java | 794 ++++++++++++
.../service/FatalErrorHandler.java | 30 +
.../distributedlog/service/MonitorService.java | 469 +++++++
.../service/MonitorServiceApp.java | 133 ++
.../distributedlog/service/ResponseUtils.java | 86 ++
.../service/ServerFeatureKeys.java | 29 +
.../distributedlog/service/StatsFilter.java | 60 +
.../service/announcer/Announcer.java | 41 +
.../service/announcer/NOPAnnouncer.java | 40 +
.../service/announcer/ServerSetAnnouncer.java | 111 ++
.../service/announcer/package-info.java | 21 +
.../service/balancer/Balancer.java | 68 +
.../service/balancer/BalancerTool.java | 327 +++++
.../service/balancer/BalancerUtils.java | 74 ++
.../service/balancer/ClusterBalancer.java | 378 ++++++
.../balancer/CountBasedStreamChooser.java | 109 ++
.../service/balancer/LimitedStreamChooser.java | 57 +
.../service/balancer/SimpleBalancer.java | 246 ++++
.../service/balancer/StreamChooser.java | 30 +
.../service/balancer/StreamMover.java | 34 +
.../service/balancer/StreamMoverImpl.java | 94 ++
.../service/balancer/package-info.java | 21 +
.../config/DefaultStreamConfigProvider.java | 73 ++
.../config/NullStreamConfigProvider.java | 40 +
.../service/config/ServerConfiguration.java | 443 +++++++
.../config/ServiceStreamConfigProvider.java | 88 ++
.../service/config/StreamConfigProvider.java | 34 +
.../service/config/package-info.java | 21 +
.../distributedlog/service/package-info.java | 21 +
.../service/placement/EqualLoadAppraiser.java | 39 +
.../placement/LeastLoadPlacementPolicy.java | 200 +++
.../service/placement/LoadAppraiser.java | 39 +
.../service/placement/PlacementPolicy.java | 148 +++
.../placement/PlacementStateManager.java | 79 ++
.../service/placement/ServerLoad.java | 158 +++
.../service/placement/StreamLoad.java | 115 ++
.../placement/ZKPlacementStateManager.java | 173 +++
.../service/placement/package-info.java | 21 +
.../service/stream/AbstractStreamOp.java | 175 +++
.../service/stream/AbstractWriteOp.java | 60 +
.../service/stream/BulkWriteOp.java | 253 ++++
.../distributedlog/service/stream/DeleteOp.java | 76 ++
.../service/stream/HeartbeatOp.java | 102 ++
.../service/stream/ReleaseOp.java | 76 ++
.../distributedlog/service/stream/Stream.java | 93 ++
.../service/stream/StreamFactory.java | 38 +
.../service/stream/StreamFactoryImpl.java | 95 ++
.../service/stream/StreamImpl.java | 926 ++++++++++++++
.../service/stream/StreamManager.java | 142 +++
.../service/stream/StreamManagerImpl.java | 413 ++++++
.../distributedlog/service/stream/StreamOp.java | 75 ++
.../service/stream/StreamOpStats.java | 104 ++
.../service/stream/TruncateOp.java | 91 ++
.../distributedlog/service/stream/WriteOp.java | 173 +++
.../service/stream/WriteOpWithPayload.java | 27 +
.../service/stream/admin/AdminOp.java | 40 +
.../service/stream/admin/CreateOp.java | 57 +
.../service/stream/admin/StreamAdminOp.java | 100 ++
.../service/stream/admin/package-info.java | 21 +
.../stream/limiter/DynamicRequestLimiter.java | 94 ++
.../stream/limiter/RequestLimiterBuilder.java | 116 ++
.../stream/limiter/ServiceRequestLimiter.java | 103 ++
.../stream/limiter/StreamAcquireLimiter.java | 56 +
.../stream/limiter/StreamRequestLimiter.java | 87 ++
.../service/stream/limiter/package-info.java | 21 +
.../service/stream/package-info.java | 21 +
.../CacheableStreamPartitionConverter.java | 58 +
.../DelimiterStreamPartitionConverter.java | 50 +
.../IdentityStreamPartitionConverter.java | 28 +
.../service/streamset/Partition.java | 99 ++
.../service/streamset/PartitionMap.java | 58 +
.../streamset/StreamPartitionConverter.java | 35 +
.../service/streamset/package-info.java | 21 +
.../distributedlog/service/tools/ProxyTool.java | 350 +++++
.../service/tools/package-info.java | 21 +
.../service/utils/ServerUtils.java | 49 +
.../service/utils/package-info.java | 21 +
.../main/resources/config/server_decider.conf | 31 +
.../main/resources/config/server_decider.yml | 44 +
.../src/main/resources/findbugsExclude.xml | 39 +
.../src/main/thrift/metadata.thrift | 29 +
.../client/routing/LocalRoutingService.java | 146 +++
.../service/DistributedLogServerTestCase.java | 298 +++++
.../service/TestDistributedLogServerBase.java | 720 +++++++++++
.../TestDistributedLogServerClientRouting.java | 58 +
.../TestDistributedLogServerServerRouting.java | 28 +
.../service/TestDistributedLogService.java | 833 ++++++++++++
.../service/TestRegionUnavailable.java | 140 ++
.../distributedlog/service/TestStatsFilter.java | 58 +
.../service/balancer/TestBalancerUtils.java | 65 +
.../service/balancer/TestClusterBalancer.java | 189 +++
.../balancer/TestCountBasedStreamChooser.java | 204 +++
.../service/balancer/TestSimpleBalancer.java | 180 +++
.../service/balancer/TestStreamMover.java | 86 ++
.../service/config/TestServerConfiguration.java | 68 +
.../config/TestStreamConfigProvider.java | 140 ++
.../placement/TestLeastLoadPlacementPolicy.java | 176 +++
.../service/placement/TestServerLoad.java | 50 +
.../service/placement/TestStreamLoad.java | 37 +
.../placement/TestZKPlacementStateManager.java | 136 ++
.../service/stream/TestStreamManager.java | 135 ++
.../service/stream/TestStreamOp.java | 95 ++
.../limiter/TestServiceRequestLimiter.java | 301 +++++
.../TestDelimiterStreamPartitionConverter.java | 52 +
.../TestIdentityStreamPartitionConverter.java | 43 +
.../service/streamset/TestPartitionMap.java | 68 +
.../service/utils/TestServerUtils.java | 41 +
.../src/test/resources/log4j.properties | 51 +
distributedlog-service/bin/bundle | 28 -
distributedlog-service/bin/common.sh | 124 --
distributedlog-service/bin/dlog | 88 --
distributedlog-service/bin/dlog-daemon.sh | 200 ---
distributedlog-service/bin/dlog-env.sh | 35 -
distributedlog-service/bin/dlog-start.sh | 34 -
distributedlog-service/bin/zk-server-start.sh | 44 -
.../conf/bookie.conf.template | 183 ---
distributedlog-service/conf/distributedlog.conf | 125 --
distributedlog-service/conf/dlogenv.sh | 75 --
distributedlog-service/conf/log4j.properties | 60 -
distributedlog-service/conf/write_proxy.conf | 143 ---
.../conf/zookeeper.conf.template | 82 --
distributedlog-service/pom.xml | 270 ----
.../stats/CodahaleMetricsServletProvider.java | 63 -
.../HealthCheckServletContextListener.java | 38 -
.../stats/MetricsServletContextListener.java | 38 -
.../bookkeeper/stats/ServletReporter.java | 62 -
.../apache/bookkeeper/stats/package-info.java | 21 -
.../distributedlog/service/ClientUtils.java | 33 -
.../service/DistributedLogCluster.java | 352 -----
.../service/DistributedLogServer.java | 460 -------
.../service/DistributedLogServerApp.java | 187 ---
.../service/DistributedLogServiceImpl.java | 794 ------------
.../service/FatalErrorHandler.java | 30 -
.../distributedlog/service/MonitorService.java | 469 -------
.../service/MonitorServiceApp.java | 133 --
.../distributedlog/service/ResponseUtils.java | 86 --
.../service/ServerFeatureKeys.java | 29 -
.../distributedlog/service/StatsFilter.java | 60 -
.../service/announcer/Announcer.java | 41 -
.../service/announcer/NOPAnnouncer.java | 40 -
.../service/announcer/ServerSetAnnouncer.java | 111 --
.../service/announcer/package-info.java | 21 -
.../service/balancer/Balancer.java | 68 -
.../service/balancer/BalancerTool.java | 327 -----
.../service/balancer/BalancerUtils.java | 74 --
.../service/balancer/ClusterBalancer.java | 378 ------
.../balancer/CountBasedStreamChooser.java | 109 --
.../service/balancer/LimitedStreamChooser.java | 57 -
.../service/balancer/SimpleBalancer.java | 246 ----
.../service/balancer/StreamChooser.java | 30 -
.../service/balancer/StreamMover.java | 34 -
.../service/balancer/StreamMoverImpl.java | 94 --
.../service/balancer/package-info.java | 21 -
.../config/DefaultStreamConfigProvider.java | 73 --
.../config/NullStreamConfigProvider.java | 40 -
.../service/config/ServerConfiguration.java | 443 -------
.../config/ServiceStreamConfigProvider.java | 88 --
.../service/config/StreamConfigProvider.java | 34 -
.../service/config/package-info.java | 21 -
.../distributedlog/service/package-info.java | 21 -
.../service/placement/EqualLoadAppraiser.java | 39 -
.../placement/LeastLoadPlacementPolicy.java | 200 ---
.../service/placement/LoadAppraiser.java | 39 -
.../service/placement/PlacementPolicy.java | 148 ---
.../placement/PlacementStateManager.java | 79 --
.../service/placement/ServerLoad.java | 158 ---
.../service/placement/StreamLoad.java | 115 --
.../placement/ZKPlacementStateManager.java | 173 ---
.../service/placement/package-info.java | 21 -
.../service/stream/AbstractStreamOp.java | 175 ---
.../service/stream/AbstractWriteOp.java | 60 -
.../service/stream/BulkWriteOp.java | 253 ----
.../distributedlog/service/stream/DeleteOp.java | 76 --
.../service/stream/HeartbeatOp.java | 102 --
.../service/stream/ReleaseOp.java | 76 --
.../distributedlog/service/stream/Stream.java | 93 --
.../service/stream/StreamFactory.java | 38 -
.../service/stream/StreamFactoryImpl.java | 95 --
.../service/stream/StreamImpl.java | 925 --------------
.../service/stream/StreamManager.java | 142 ---
.../service/stream/StreamManagerImpl.java | 413 ------
.../distributedlog/service/stream/StreamOp.java | 75 --
.../service/stream/StreamOpStats.java | 104 --
.../service/stream/TruncateOp.java | 91 --
.../distributedlog/service/stream/WriteOp.java | 173 ---
.../service/stream/WriteOpWithPayload.java | 27 -
.../service/stream/admin/AdminOp.java | 40 -
.../service/stream/admin/CreateOp.java | 57 -
.../service/stream/admin/StreamAdminOp.java | 100 --
.../service/stream/admin/package-info.java | 21 -
.../stream/limiter/DynamicRequestLimiter.java | 94 --
.../stream/limiter/RequestLimiterBuilder.java | 116 --
.../stream/limiter/ServiceRequestLimiter.java | 103 --
.../stream/limiter/StreamAcquireLimiter.java | 56 -
.../stream/limiter/StreamRequestLimiter.java | 87 --
.../service/stream/limiter/package-info.java | 21 -
.../service/stream/package-info.java | 21 -
.../CacheableStreamPartitionConverter.java | 58 -
.../DelimiterStreamPartitionConverter.java | 50 -
.../IdentityStreamPartitionConverter.java | 28 -
.../service/streamset/Partition.java | 99 --
.../service/streamset/PartitionMap.java | 58 -
.../streamset/StreamPartitionConverter.java | 35 -
.../service/streamset/package-info.java | 21 -
.../distributedlog/service/tools/ProxyTool.java | 350 -----
.../service/tools/package-info.java | 21 -
.../service/utils/ServerUtils.java | 49 -
.../service/utils/package-info.java | 21 -
.../main/resources/config/server_decider.conf | 31 -
.../main/resources/config/server_decider.yml | 44 -
.../src/main/resources/findbugsExclude.xml | 39 -
.../src/main/thrift/metadata.thrift | 29 -
.../client/routing/LocalRoutingService.java | 146 ---
.../service/DistributedLogServerTestCase.java | 298 -----
.../service/TestDistributedLogServerBase.java | 720 -----------
.../TestDistributedLogServerClientRouting.java | 58 -
.../TestDistributedLogServerServerRouting.java | 28 -
.../service/TestDistributedLogService.java | 833 ------------
.../service/TestRegionUnavailable.java | 140 --
.../distributedlog/service/TestStatsFilter.java | 58 -
.../service/balancer/TestBalancerUtils.java | 65 -
.../service/balancer/TestClusterBalancer.java | 189 ---
.../balancer/TestCountBasedStreamChooser.java | 204 ---
.../service/balancer/TestSimpleBalancer.java | 180 ---
.../service/balancer/TestStreamMover.java | 86 --
.../service/config/TestServerConfiguration.java | 68 -
.../config/TestStreamConfigProvider.java | 140 --
.../placement/TestLeastLoadPlacementPolicy.java | 176 ---
.../service/placement/TestServerLoad.java | 50 -
.../service/placement/TestStreamLoad.java | 37 -
.../placement/TestZKPlacementStateManager.java | 136 --
.../service/stream/TestStreamManager.java | 135 --
.../service/stream/TestStreamOp.java | 95 --
.../limiter/TestServiceRequestLimiter.java | 301 -----
.../TestDelimiterStreamPartitionConverter.java | 52 -
.../TestIdentityStreamPartitionConverter.java | 43 -
.../service/streamset/TestPartitionMap.java | 68 -
.../service/utils/TestServerUtils.java | 41 -
.../src/test/resources/log4j.properties | 51 -
.../distributedlog-basic/pom.xml | 2 +-
.../distributedlog-mapreduce/pom.xml | 2 +-
.../distributedlog-messaging/pom.xml | 2 +-
pom.xml | 7 +-
438 files changed, 26309 insertions(+), 26118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/c44e0278/distributedlog-benchmark/pom.xml
----------------------------------------------------------------------
diff --git a/distributedlog-benchmark/pom.xml b/distributedlog-benchmark/pom.xml
index 1184907..26651ad 100644
--- a/distributedlog-benchmark/pom.xml
+++ b/distributedlog-benchmark/pom.xml
@@ -27,7 +27,7 @@
<dependencies>
<dependency>
<groupId>org.apache.distributedlog</groupId>
- <artifactId>distributedlog-client</artifactId>
+ <artifactId>distributedlog-proxy-client</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/c44e0278/distributedlog-benchmark/src/main/java/org/apache/distributedlog/benchmark/WriterWorker.java
----------------------------------------------------------------------
diff --git a/distributedlog-benchmark/src/main/java/org/apache/distributedlog/benchmark/WriterWorker.java b/distributedlog-benchmark/src/main/java/org/apache/distributedlog/benchmark/WriterWorker.java
index 9e96765..fa96dfb 100644
--- a/distributedlog-benchmark/src/main/java/org/apache/distributedlog/benchmark/WriterWorker.java
+++ b/distributedlog-benchmark/src/main/java/org/apache/distributedlog/benchmark/WriterWorker.java
@@ -28,6 +28,7 @@ import org.apache.distributedlog.exceptions.DLException;
import org.apache.distributedlog.io.CompressionCodec;
import org.apache.distributedlog.service.DistributedLogClient;
import org.apache.distributedlog.service.DistributedLogClientBuilder;
+import org.apache.distributedlog.thrift.service.StatusCode;
import org.apache.distributedlog.util.SchedulerUtils;
import com.twitter.finagle.builder.ClientBuilder;
import com.twitter.finagle.stats.StatsReceiver;
@@ -278,7 +279,7 @@ public class WriterWorker implements Worker {
exceptionsLogger.getCounter(cause.getClass().getName()).inc();
if (cause instanceof DLException) {
DLException dle = (DLException) cause;
- dlErrorCodeLogger.getCounter(dle.getCode().toString()).inc();
+ dlErrorCodeLogger.getCounter(StatusCode.findByValue(dle.getCode()).toString()).inc();
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/c44e0278/distributedlog-client/pom.xml
----------------------------------------------------------------------
diff --git a/distributedlog-client/pom.xml b/distributedlog-client/pom.xml
deleted file mode 100644
index 5f3aa16..0000000
--- a/distributedlog-client/pom.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.distributedlog</groupId>
- <artifactId>distributedlog</artifactId>
- <version>0.5.0-incubating-SNAPSHOT</version>
- </parent>
- <artifactId>distributedlog-client</artifactId>
- <name>Apache DistributedLog :: Proxy Client</name>
- <dependencies>
- <dependency>
- <groupId>org.apache.distributedlog</groupId>
- <artifactId>distributedlog-protocol</artifactId>
- <version>${project.parent.version}</version>
- </dependency>
- <dependency>
- <groupId>com.twitter</groupId>
- <artifactId>finagle-core_2.11</artifactId>
- <version>${finagle.version}</version>
- </dependency>
- <dependency>
- <groupId>com.twitter</groupId>
- <artifactId>finagle-thriftmux_2.11</artifactId>
- <version>${finagle.version}</version>
- </dependency>
- <dependency>
- <groupId>com.twitter</groupId>
- <artifactId>finagle-serversets_2.11</artifactId>
- <version>${finagle.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>${guava.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>${commons-lang3.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>${mockito.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.distributedlog</groupId>
- <artifactId>distributedlog-protocol</artifactId>
- <version>${project.parent.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <configuration>
- <excludeFilterFile>${basedir}/src/main/resources/findbugsExclude.xml</excludeFilterFile>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${maven-compiler-plugin.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>${maven-jar-plugin.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${maven-surefire-plugin.version}</version>
- <configuration>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true -XX:MaxDirectMemorySize=2G</argLine>
- <forkMode>always</forkMode>
- <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
- <properties>
- <property>
- <name>listener</name>
- <value>org.apache.distributedlog.TimedOutTestsListener</value>
- </property>
- </properties>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${maven-checkstyle-plugin.version}</version>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${puppycrawl.checkstyle.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.distributedlog</groupId>
- <artifactId>distributedlog-build-tools</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <configuration>
- <configLocation>distributedlog/checkstyle.xml</configLocation>
- <suppressionsLocation>distributedlog/suppressions.xml</suppressionsLocation>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
- <includeResources>false</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- </configuration>
- <executions>
- <execution>
- <phase>test-compile</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-distributedlog/blob/c44e0278/distributedlog-client/src/main/java/org/apache/distributedlog/client/ClientConfig.java
----------------------------------------------------------------------
diff --git a/distributedlog-client/src/main/java/org/apache/distributedlog/client/ClientConfig.java b/distributedlog-client/src/main/java/org/apache/distributedlog/client/ClientConfig.java
deleted file mode 100644
index 57e2b5a..0000000
--- a/distributedlog-client/src/main/java/org/apache/distributedlog/client/ClientConfig.java
+++ /dev/null
@@ -1,187 +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.distributedlog.client;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.concurrent.TimeUnit;
-
-/**
- * Client Config.
- */
-public class ClientConfig {
- int redirectBackoffStartMs = 25;
- int redirectBackoffMaxMs = 100;
- int maxRedirects = -1;
- int requestTimeoutMs = -1;
- boolean thriftmux = false;
- boolean streamFailfast = false;
- String streamNameRegex = ".*";
- boolean handshakeWithClientInfo = true;
- long periodicHandshakeIntervalMs = TimeUnit.MINUTES.toMillis(5);
- long periodicOwnershipSyncIntervalMs = TimeUnit.MINUTES.toMillis(5);
- boolean periodicDumpOwnershipCacheEnabled = false;
- long periodicDumpOwnershipCacheIntervalMs = TimeUnit.MINUTES.toMillis(10);
- boolean enableHandshakeTracing = false;
- boolean enableChecksum = true;
-
- public ClientConfig setMaxRedirects(int maxRedirects) {
- this.maxRedirects = maxRedirects;
- return this;
- }
-
- public int getMaxRedirects() {
- return this.maxRedirects;
- }
-
- public ClientConfig setRequestTimeoutMs(int timeoutInMillis) {
- this.requestTimeoutMs = timeoutInMillis;
- return this;
- }
-
- public int getRequestTimeoutMs() {
- return this.requestTimeoutMs;
- }
-
- public ClientConfig setRedirectBackoffStartMs(int ms) {
- this.redirectBackoffStartMs = ms;
- return this;
- }
-
- public int getRedirectBackoffStartMs() {
- return this.redirectBackoffStartMs;
- }
-
- public ClientConfig setRedirectBackoffMaxMs(int ms) {
- this.redirectBackoffMaxMs = ms;
- return this;
- }
-
- public int getRedirectBackoffMaxMs() {
- return this.redirectBackoffMaxMs;
- }
-
- public ClientConfig setThriftMux(boolean enabled) {
- this.thriftmux = enabled;
- return this;
- }
-
- public boolean getThriftMux() {
- return this.thriftmux;
- }
-
- public ClientConfig setStreamFailfast(boolean enabled) {
- this.streamFailfast = enabled;
- return this;
- }
-
- public boolean getStreamFailfast() {
- return this.streamFailfast;
- }
-
- public ClientConfig setStreamNameRegex(String nameRegex) {
- checkNotNull(nameRegex);
- this.streamNameRegex = nameRegex;
- return this;
- }
-
- public String getStreamNameRegex() {
- return this.streamNameRegex;
- }
-
- public ClientConfig setHandshakeWithClientInfo(boolean enabled) {
- this.handshakeWithClientInfo = enabled;
- return this;
- }
-
- public boolean getHandshakeWithClientInfo() {
- return this.handshakeWithClientInfo;
- }
-
- public ClientConfig setPeriodicHandshakeIntervalMs(long intervalMs) {
- this.periodicHandshakeIntervalMs = intervalMs;
- return this;
- }
-
- public long getPeriodicHandshakeIntervalMs() {
- return this.periodicHandshakeIntervalMs;
- }
-
- public ClientConfig setPeriodicOwnershipSyncIntervalMs(long intervalMs) {
- this.periodicOwnershipSyncIntervalMs = intervalMs;
- return this;
- }
-
- public long getPeriodicOwnershipSyncIntervalMs() {
- return this.periodicOwnershipSyncIntervalMs;
- }
-
- public ClientConfig setPeriodicDumpOwnershipCacheEnabled(boolean enabled) {
- this.periodicDumpOwnershipCacheEnabled = enabled;
- return this;
- }
-
- public boolean isPeriodicDumpOwnershipCacheEnabled() {
- return this.periodicDumpOwnershipCacheEnabled;
- }
-
- public ClientConfig setPeriodicDumpOwnershipCacheIntervalMs(long intervalMs) {
- this.periodicDumpOwnershipCacheIntervalMs = intervalMs;
- return this;
- }
-
- public long getPeriodicDumpOwnershipCacheIntervalMs() {
- return this.periodicDumpOwnershipCacheIntervalMs;
- }
-
- public ClientConfig setHandshakeTracingEnabled(boolean enabled) {
- this.enableHandshakeTracing = enabled;
- return this;
- }
-
- public boolean isHandshakeTracingEnabled() {
- return this.enableHandshakeTracing;
- }
-
- public ClientConfig setChecksumEnabled(boolean enabled) {
- this.enableChecksum = enabled;
- return this;
- }
-
- public boolean isChecksumEnabled() {
- return this.enableChecksum;
- }
-
- public static ClientConfig newConfig(ClientConfig config) {
- ClientConfig newConfig = new ClientConfig();
- newConfig.setMaxRedirects(config.getMaxRedirects())
- .setRequestTimeoutMs(config.getRequestTimeoutMs())
- .setRedirectBackoffStartMs(config.getRedirectBackoffStartMs())
- .setRedirectBackoffMaxMs(config.getRedirectBackoffMaxMs())
- .setThriftMux(config.getThriftMux())
- .setStreamFailfast(config.getStreamFailfast())
- .setStreamNameRegex(config.getStreamNameRegex())
- .setHandshakeWithClientInfo(config.getHandshakeWithClientInfo())
- .setPeriodicHandshakeIntervalMs(config.getPeriodicHandshakeIntervalMs())
- .setPeriodicDumpOwnershipCacheEnabled(config.isPeriodicDumpOwnershipCacheEnabled())
- .setPeriodicDumpOwnershipCacheIntervalMs(config.getPeriodicDumpOwnershipCacheIntervalMs())
- .setHandshakeTracingEnabled(config.isHandshakeTracingEnabled())
- .setChecksumEnabled(config.isChecksumEnabled());
- return newConfig;
- }
-}