Skip to content

Commit

Permalink
make bookie ranges stored in path/to/bkdata/ranges (apache#6082)
Browse files Browse the repository at this point in the history
Fixes apache#5326  

### Motivation

After this fix, pulsar will not create data/bookkeeper/ranges in the pulsar library folder after executing `bin/pulsar standalone --bookkeeper-dir dir1 --zookeeper-dir dir2`. All the bookie ranges will be stored in bookkeeper's data directory. 

### Modifications
Pass `storage.range.store.dirs` to storage server when starting pulsar. Hardcode ranges's dir to ${path/to/bookie/datadir}/ranges/data, just under bookie. 

### Verifying this change
Follow the steps in [issue 5326](apache#5326) and start pulsar with `bin/pulsar standalone --bookkeeper-dir dir1 --zookeeper-dir dir2`
  • Loading branch information
hanbo1990 authored and sijie committed Jan 25, 2020
1 parent e1e2523 commit 5ae7a00
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ public void runStreamStorage(CompositeConfiguration conf) throws Exception {
// stream storage port
conf.setProperty("storageserver.grpc.port", streamStoragePort);

// storage server settings
conf.setProperty("storage.range.store.dirs", bkDataDirName + "/ranges/data");

// initialize the stream storage metadata
ClusterInitializer initializer = new ZkClusterInitializer(zkServers);
initializer.initializeCluster(metadataServiceUri, 2);
Expand Down

0 comments on commit 5ae7a00

Please sign in to comment.