Skip to content
Permalink
Browse files

Propagate configuration updates automatically to clients

This PR merges the feature branch into master.

pr-link: #9087
change-id: cid-626eed5a65bca461d7304215572165f55dbbbabf
  • Loading branch information...
cheng-chang authored and alluxio-bot committed May 14, 2019
1 parent 0917c51 commit 797ddb999cb60fc908e16400a21ce72eb9989fd2
Showing with 3,959 additions and 997 deletions.
  1. +4 −8 core/client/fs/src/main/java/alluxio/client/block/BlockMasterClientPool.java
  2. +162 −266 core/client/fs/src/main/java/alluxio/client/file/BaseFileSystem.java
  3. +118 −0 core/client/fs/src/main/java/alluxio/client/file/ConfigHashSync.java
  4. +14 −4 core/client/fs/src/main/java/alluxio/client/file/FileInStream.java
  5. +5 −1 core/client/fs/src/main/java/alluxio/client/file/FileOutStream.java
  6. +2 −2 core/client/fs/src/main/java/alluxio/client/file/FileSystem.java
  7. +227 −138 core/client/fs/src/main/java/alluxio/client/file/FileSystemContext.java
  8. +146 −0 core/client/fs/src/main/java/alluxio/client/file/FileSystemContextReinitializer.java
  9. +4 −9 core/client/fs/src/main/java/alluxio/client/file/FileSystemMasterClientPool.java
  10. +1 −1 core/client/fs/src/main/java/alluxio/client/file/RetryHandlingFileSystemMasterClient.java
  11. +9 −1 core/client/fs/src/main/java/alluxio/client/meta/MetaMasterConfigClient.java
  12. +10 −2 core/client/fs/src/main/java/alluxio/client/meta/RetryHandlingMetaMasterConfigClient.java
  13. +3 −3 core/client/fs/src/main/java/alluxio/client/metrics/MetricsHeartbeatContext.java
  14. +6 −2 core/client/fs/src/test/java/alluxio/client/block/BlockMasterClientPoolTest.java
  15. +9 −3 core/client/fs/src/test/java/alluxio/client/file/BaseFileSystemTest.java
  16. +7 −10 core/client/fs/src/test/java/alluxio/client/file/FileSystemContextTest.java
  17. +6 −2 core/client/fs/src/test/java/alluxio/client/file/FileSystemMasterClientPoolTest.java
  18. +2 −1 core/client/fs/src/test/java/alluxio/client/file/MockFileInStream.java
  19. +3 −3 core/client/fs/src/test/java/alluxio/client/metrics/MetricsHeartbeatContextTest.java
  20. +13 −10 core/common/src/main/java/alluxio/AbstractClient.java
  21. +5 −0 core/common/src/main/java/alluxio/Client.java
  22. +66 −19 core/common/src/main/java/alluxio/ClientContext.java
  23. +7 −0 core/common/src/main/java/alluxio/conf/AlluxioConfiguration.java
  24. +18 −1 core/common/src/main/java/alluxio/conf/AlluxioProperties.java
  25. +80 −0 core/common/src/main/java/alluxio/conf/Hash.java
  26. +5 −0 core/common/src/main/java/alluxio/conf/InstancedConfiguration.java
  27. +21 −0 core/common/src/main/java/alluxio/conf/PropertyKey.java
  28. +2 −0 core/common/src/main/java/alluxio/heartbeat/HeartbeatContext.java
  29. +40 −6 core/common/src/main/java/alluxio/heartbeat/HeartbeatThread.java
  30. +1 −1 core/common/src/main/java/alluxio/master/MasterClientContext.java
  31. +1 −1 core/common/src/main/java/alluxio/master/MasterClientContextBuilder.java
  32. +3 −1 core/common/src/main/java/alluxio/resource/CloseableResource.java
  33. +12 −58 core/common/src/main/java/alluxio/util/ConfigurationUtils.java
  34. +100 −0 core/common/src/main/java/alluxio/wire/ConfigHash.java
  35. +134 −3 core/common/src/main/java/alluxio/wire/Configuration.java
  36. +29 −1 core/common/src/main/java/alluxio/wire/Property.java
  37. +33 −0 core/common/src/test/java/alluxio/conf/AlluxioPropertiesTest.java
  38. +6 −0 core/common/src/test/java/alluxio/master/PortRegistry.java
  39. +17 −4 core/server/common/src/main/java/alluxio/conf/ServerConfiguration.java
  40. +2 −1 core/server/master/src/main/java/alluxio/master/meta/AlluxioMasterRestServiceHandler.java
  41. +32 −29 core/server/master/src/main/java/alluxio/master/meta/DefaultMetaMaster.java
  42. +5 −6 core/server/master/src/main/java/alluxio/master/meta/MetaMaster.java
  43. +44 −5 core/server/master/src/main/java/alluxio/master/meta/MetaMasterConfigurationServiceHandler.java
  44. +27 −0 core/server/master/src/main/java/alluxio/master/meta/PathProperties.java
  45. +47 −0 core/server/master/src/main/java/alluxio/master/meta/PathPropertiesView.java
  46. +1 −4 core/server/master/src/test/java/alluxio/master/{ → file}/meta/InodeLockManagerTest.java
  47. +39 −0 core/server/master/src/test/java/alluxio/master/meta/PathPropertiesTest.java
  48. +1 −1 core/server/worker/src/main/java/alluxio/worker/AlluxioWorker.java
  49. +30 −15 core/transport/src/grpc/meta_master.proto
  50. +388 −0 core/transport/src/main/java/alluxio/grpc/GetConfigHashPOptions.java
  51. +9 −0 core/transport/src/main/java/alluxio/grpc/GetConfigHashPOptionsOrBuilder.java
  52. +696 −0 core/transport/src/main/java/alluxio/grpc/GetConfigHashPResponse.java
  53. +37 −0 core/transport/src/main/java/alluxio/grpc/GetConfigHashPResponseOrBuilder.java
  54. +158 −0 core/transport/src/main/java/alluxio/grpc/GetConfigurationPOptions.java
  55. +18 −0 core/transport/src/main/java/alluxio/grpc/GetConfigurationPOptionsOrBuilder.java
  56. +457 −152 core/transport/src/main/java/alluxio/grpc/GetConfigurationPResponse.java
  57. +38 −10 core/transport/src/main/java/alluxio/grpc/GetConfigurationPResponseOrBuilder.java
  58. +91 −0 core/transport/src/main/java/alluxio/grpc/MetaMasterConfigurationServiceGrpc.java
  59. +159 −130 core/transport/src/main/java/alluxio/grpc/MetaMasterProto.java
  60. +1 −1 job/client/src/main/java/alluxio/client/job/JobMasterClientPool.java
  61. +2 −1 job/client/src/main/java/alluxio/worker/job/JobMasterClientContextBuilder.java
  62. +1 −1 job/server/src/main/java/alluxio/worker/AlluxioJobWorker.java
  63. +21 −10 minicluster/src/main/java/alluxio/master/MultiMasterLocalAlluxioCluster.java
  64. +11 −7 minicluster/src/main/java/alluxio/multi/process/MultiProcessCluster.java
  65. +5 −3 shell/src/main/java/alluxio/cli/GetConf.java
  66. +4 −5 shell/src/main/java/alluxio/cli/fs/command/CheckConsistencyCommand.java
  67. +3 −2 shell/src/main/java/alluxio/cli/fs/command/LsCommand.java
  68. +3 −1 shell/src/main/java/alluxio/cli/fsadmin/pathconf/ListCommand.java
  69. +3 −1 shell/src/main/java/alluxio/cli/fsadmin/pathconf/ShowCommand.java
  70. +4 −3 tests/src/test/java/alluxio/client/cli/fs/GetConfTest.java
  71. +71 −30 tests/src/test/java/alluxio/client/cli/fsadmin/pathconf/AddCommandIntegrationTest.java
  72. +1 −1 tests/src/test/java/alluxio/client/cli/fsadmin/pathconf/ListCommandIntegrationTest.java
  73. +1 −1 tests/src/test/java/alluxio/client/cli/fsadmin/pathconf/ShowCommandIntegrationTest.java
  74. +207 −0 tests/src/test/java/alluxio/client/fs/FileSystemContextReinitIntegrationTest.java
  75. +1 −5 tests/src/test/java/alluxio/client/fs/PathConfigurationIntegrationTest.java
  76. +3 −1 tests/src/test/java/alluxio/client/meta/MetaMasterIntegrationTest.java
  77. +7 −10 tests/src/test/java/alluxio/job/persist/PersistIntegrationTest.java
@@ -11,10 +11,8 @@

package alluxio.client.block;

import alluxio.ClientContext;
import alluxio.conf.PropertyKey;
import alluxio.master.MasterClientContext;
import alluxio.master.MasterInquireClient;
import alluxio.resource.ResourcePool;

import com.google.common.io.Closer;
@@ -38,14 +36,12 @@
/**
* Creates a new block master client pool.
*
* @param context the information required for connecting to Alluxio
* @param masterInquireClient a client for determining the master address
* @param ctx the information required for connecting to Alluxio
*/
public BlockMasterClientPool(ClientContext context, MasterInquireClient masterInquireClient) {
super(context.getConf().getInt(PropertyKey.USER_BLOCK_MASTER_CLIENT_THREADS));
public BlockMasterClientPool(MasterClientContext ctx) {
super(ctx.getClusterConf().getInt(PropertyKey.USER_BLOCK_MASTER_CLIENT_THREADS));
mClientList = new ConcurrentLinkedQueue<>();
mMasterContext =
MasterClientContext.newBuilder(context).setMasterInquireClient(masterInquireClient).build();
mMasterContext = ctx;
}

@Override

0 comments on commit 797ddb9

Please sign in to comment.
You can’t perform that action at this time.