You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/01 21:45:55 UTC

[GitHub] [pinot] klsince opened a new pull request, #9705: Quickstart example for multi-datadirs support on server

klsince opened a new pull request, #9705:
URL: https://github.com/apache/pinot/pull/9705

   This PR is part of the work to support multi-datadir for Pinot server as tracked by https://github.com/apache/pinot/issues/8843. 
   
   This one makes it simpler to config the feature, and adds a QuickStart example about how this works with the typical configs.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] npawar merged pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
npawar merged PR #9705:
URL: https://github.com/apache/pinot/pull/9705


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] codecov-commenter commented on pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #9705:
URL: https://github.com/apache/pinot/pull/9705#issuecomment-1299323345

   # [Codecov](https://codecov.io/gh/apache/pinot/pull/9705?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#9705](https://codecov.io/gh/apache/pinot/pull/9705?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (120e673) into [master](https://codecov.io/gh/apache/pinot/commit/8b03dee7adcbee9c8d92b76a1597ae804f150383?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8b03dee) will **increase** coverage by `35.16%`.
   > The diff coverage is `83.95%`.
   
   ```diff
   @@              Coverage Diff              @@
   ##             master    #9705       +/-   ##
   =============================================
   + Coverage     34.81%   69.98%   +35.16%     
   - Complexity      190     4937     +4747     
   =============================================
     Files          1950     1950               
     Lines        104313   104397       +84     
     Branches      15802    15815       +13     
   =============================================
   + Hits          36320    73063    +36743     
   + Misses        64896    26202    -38694     
   - Partials       3097     5132     +2035     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1 | `25.42% <4.93%> (+0.03%)` | :arrow_up: |
   | integration2 | `24.71% <4.93%> (?)` | |
   | unittests1 | `67.43% <88.88%> (?)` | |
   | unittests2 | `15.70% <4.93%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/pinot/pull/9705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...roller/helix/core/relocation/SegmentRelocator.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29udHJvbGxlci9oZWxpeC9jb3JlL3JlbG9jYXRpb24vU2VnbWVudFJlbG9jYXRvci5qYXZh) | `63.57% <0.00%> (ø)` | |
   | [.../apache/pinot/controller/util/TableTierReader.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29udHJvbGxlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29udHJvbGxlci91dGlsL1RhYmxlVGllclJlYWRlci5qYXZh) | `84.21% <57.14%> (-4.26%)` | :arrow_down: |
   | [...ent/local/data/manager/TableDataManagerConfig.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9kYXRhL21hbmFnZXIvVGFibGVEYXRhTWFuYWdlckNvbmZpZy5qYXZh) | `40.98% <78.12%> (+40.98%)` | :arrow_up: |
   | [...che/pinot/common/utils/config/TierConfigUtils.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvY29uZmlnL1RpZXJDb25maWdVdGlscy5qYXZh) | `74.54% <95.83%> (+72.27%)` | :arrow_up: |
   | [.../pinot/core/data/manager/BaseTableDataManager.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvQmFzZVRhYmxlRGF0YU1hbmFnZXIuamF2YQ==) | `76.40% <100.00%> (+16.40%)` | :arrow_up: |
   | [...indexsegment/immutable/ImmutableSegmentLoader.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9pbmRleHNlZ21lbnQvaW1tdXRhYmxlL0ltbXV0YWJsZVNlZ21lbnRMb2FkZXIuamF2YQ==) | `85.84% <100.00%> (+85.84%)` | :arrow_up: |
   | [.../local/loader/TierBasedSegmentDirectoryLoader.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9sb2FkZXIvVGllckJhc2VkU2VnbWVudERpcmVjdG9yeUxvYWRlci5qYXZh) | `90.81% <100.00%> (+90.81%)` | :arrow_up: |
   | [...local/segment/index/loader/IndexLoadingConfig.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9zZWdtZW50L2luZGV4L2xvYWRlci9JbmRleExvYWRpbmdDb25maWcuamF2YQ==) | `72.96% <100.00%> (+72.96%)` | :arrow_up: |
   | [...ment/spi/loader/SegmentDirectoryLoaderContext.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1zcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3Bpbm90L3NlZ21lbnQvc3BpL2xvYWRlci9TZWdtZW50RGlyZWN0b3J5TG9hZGVyQ29udGV4dC5qYXZh) | `92.50% <100.00%> (+92.50%)` | :arrow_up: |
   | [...in/stream/kafka20/KafkaStreamMetadataProvider.java](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtcGx1Z2lucy9waW5vdC1zdHJlYW0taW5nZXN0aW9uL3Bpbm90LWthZmthLTIuMC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvcGx1Z2luL3N0cmVhbS9rYWZrYTIwL0thZmthU3RyZWFtTWV0YWRhdGFQcm92aWRlci5qYXZh) | `48.38% <0.00%> (-6.16%)` | :arrow_down: |
   | ... and [1121 more](https://codecov.io/gh/apache/pinot/pull/9705/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] npawar commented on a diff in pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
npawar commented on code in PR #9705:
URL: https://github.com/apache/pinot/pull/9705#discussion_r1041263917


##########
pinot-tools/src/main/java/org/apache/pinot/tools/MultiDirQuickstart.java:
##########
@@ -0,0 +1,110 @@
+/**
+ * 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.pinot.tools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.tools.admin.PinotAdministrator;
+import org.apache.pinot.tools.admin.command.QuickstartRunner;
+
+
+/**
+ * A Quickstart to demo how multi directory support works and its typical configs.
+ */
+public class MultiDirQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return Arrays.asList("OFFLINE_MULTIDIR", "OFFLINE-MULTIDIR", "BATCH_MULTIDIR", "BATCH-MULTIDIR");
+  }
+
+  @Override
+  protected Map<String, Object> getConfigOverrides() {
+    Map<String, Object> properties = new HashMap<>(super.getConfigOverrides());
+    properties.put("pinot.server.instance.segment.directory.loader", "tierBased");
+    properties.put("controller.segment.relocator.frequencyPeriod", "60s");
+    properties.put("controller.segmentRelocator.initialDelayInSeconds", "10");
+    properties.put("controller.segmentRelocator.enableLocalTierMigration", "true");
+    /*
+     * One can also set `dataDir` as part of tierConfigs in TableConfig to overwrite the instance configs (or set as
+     * cluster configs), but it's recommended to use instance (or cluster) configs for consistency across tables.
+     * "tierBackendProperties": {
+     *     "dataDir": "/tmp/multidir_test/hotTier"
+     *  }
+     */
+    properties.put("pinot.server.instance.tierConfigs.0.tierName", "hotTier");

Review Comment:
   we can put these in cluster config as well? 



##########
pinot-tools/src/main/java/org/apache/pinot/tools/MultiDirQuickstart.java:
##########
@@ -0,0 +1,110 @@
+/**
+ * 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.pinot.tools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.tools.admin.PinotAdministrator;
+import org.apache.pinot.tools.admin.command.QuickstartRunner;
+
+
+/**
+ * A Quickstart to demo how multi directory support works and its typical configs.
+ */
+public class MultiDirQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return Arrays.asList("OFFLINE_MULTIDIR", "OFFLINE-MULTIDIR", "BATCH_MULTIDIR", "BATCH-MULTIDIR");
+  }
+
+  @Override
+  protected Map<String, Object> getConfigOverrides() {
+    Map<String, Object> properties = new HashMap<>(super.getConfigOverrides());
+    properties.put("pinot.server.instance.segment.directory.loader", "tierBased");
+    properties.put("controller.segment.relocator.frequencyPeriod", "60s");
+    properties.put("controller.segmentRelocator.initialDelayInSeconds", "10");
+    properties.put("controller.segmentRelocator.enableLocalTierMigration", "true");
+    /*
+     * One can also set `dataDir` as part of tierConfigs in TableConfig to overwrite the instance configs (or set as
+     * cluster configs), but it's recommended to use instance (or cluster) configs for consistency across tables.
+     * "tierBackendProperties": {
+     *     "dataDir": "/tmp/multidir_test/hotTier"
+     *  }
+     */
+    properties.put("pinot.server.instance.tierConfigs.0.tierName", "hotTier");
+    properties.put("pinot.server.instance.tierConfigs.0.dataDir", "/tmp/multidir_test/hotTier");
+    properties.put("pinot.server.instance.tierConfigs.1.tierName", "coldTier");
+    properties.put("pinot.server.instance.tierConfigs.1.dataDir", "/tmp/multidir_test/coldTier");

Review Comment:
   looks like this "0" and "1" can be anything at all, and is being used just to distinguish the keys. would it be better to have this instead? this is also how we do it in FS configs I think
   ```
   pinot.server.instance.tierConfigs.tierNames=hotTier,coldTier
   pinot.server.instance.tierConfigs.hotTier.dataDir=/tmp/multidir_test/hotTier
   pinot.server.instance.tierConfigs.coldTier.dataDir=/tmp/multidir_test/coldTier
   ```



##########
pinot-tools/src/main/resources/examples/batch/airlineStats/airlineStats_offline_table_config.json:
##########
@@ -40,5 +42,21 @@
         "transformFunction": "fromEpochDays(DaysSinceEpoch)"
       }
     ]
-  }
+  },
+  "tierConfigs": [
+    {

Review Comment:
   wont setting this config automatically make all quickstarts do tier movements? as SegmentRelocator is on by default?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] klsince commented on a diff in pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
klsince commented on code in PR #9705:
URL: https://github.com/apache/pinot/pull/9705#discussion_r1041305037


##########
pinot-tools/src/main/java/org/apache/pinot/tools/MultiDirQuickstart.java:
##########
@@ -0,0 +1,110 @@
+/**
+ * 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.pinot.tools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.tools.admin.PinotAdministrator;
+import org.apache.pinot.tools.admin.command.QuickstartRunner;
+
+
+/**
+ * A Quickstart to demo how multi directory support works and its typical configs.
+ */
+public class MultiDirQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return Arrays.asList("OFFLINE_MULTIDIR", "OFFLINE-MULTIDIR", "BATCH_MULTIDIR", "BATCH-MULTIDIR");
+  }
+
+  @Override
+  protected Map<String, Object> getConfigOverrides() {
+    Map<String, Object> properties = new HashMap<>(super.getConfigOverrides());
+    properties.put("pinot.server.instance.segment.directory.loader", "tierBased");
+    properties.put("controller.segment.relocator.frequencyPeriod", "60s");
+    properties.put("controller.segmentRelocator.initialDelayInSeconds", "10");
+    properties.put("controller.segmentRelocator.enableLocalTierMigration", "true");
+    /*
+     * One can also set `dataDir` as part of tierConfigs in TableConfig to overwrite the instance configs (or set as
+     * cluster configs), but it's recommended to use instance (or cluster) configs for consistency across tables.
+     * "tierBackendProperties": {
+     *     "dataDir": "/tmp/multidir_test/hotTier"
+     *  }
+     */
+    properties.put("pinot.server.instance.tierConfigs.0.tierName", "hotTier");

Review Comment:
   Yes, those properties here show that configs can be part of instance configs. But they can be set in cluster config as well, as all cluster config is merged into instance config when instance starts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] klsince commented on a diff in pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
klsince commented on code in PR #9705:
URL: https://github.com/apache/pinot/pull/9705#discussion_r1041326586


##########
pinot-tools/src/main/java/org/apache/pinot/tools/MultiDirQuickstart.java:
##########
@@ -0,0 +1,110 @@
+/**
+ * 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.pinot.tools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.tools.admin.PinotAdministrator;
+import org.apache.pinot.tools.admin.command.QuickstartRunner;
+
+
+/**
+ * A Quickstart to demo how multi directory support works and its typical configs.
+ */
+public class MultiDirQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return Arrays.asList("OFFLINE_MULTIDIR", "OFFLINE-MULTIDIR", "BATCH_MULTIDIR", "BATCH-MULTIDIR");
+  }
+
+  @Override
+  protected Map<String, Object> getConfigOverrides() {
+    Map<String, Object> properties = new HashMap<>(super.getConfigOverrides());
+    properties.put("pinot.server.instance.segment.directory.loader", "tierBased");
+    properties.put("controller.segment.relocator.frequencyPeriod", "60s");
+    properties.put("controller.segmentRelocator.initialDelayInSeconds", "10");
+    properties.put("controller.segmentRelocator.enableLocalTierMigration", "true");
+    /*
+     * One can also set `dataDir` as part of tierConfigs in TableConfig to overwrite the instance configs (or set as
+     * cluster configs), but it's recommended to use instance (or cluster) configs for consistency across tables.
+     * "tierBackendProperties": {
+     *     "dataDir": "/tmp/multidir_test/hotTier"
+     *  }
+     */
+    properties.put("pinot.server.instance.tierConfigs.0.tierName", "hotTier");
+    properties.put("pinot.server.instance.tierConfigs.0.dataDir", "/tmp/multidir_test/hotTier");
+    properties.put("pinot.server.instance.tierConfigs.1.tierName", "coldTier");
+    properties.put("pinot.server.instance.tierConfigs.1.dataDir", "/tmp/multidir_test/coldTier");

Review Comment:
   right, the part of "0" or "1" can be anything unique.
   
   I think I saw both conventions in pinot configs. I chose this one to avoid worries about escaping name separator in tier names, which should rare anyway. Will check out FS config.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] klsince commented on a diff in pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
klsince commented on code in PR #9705:
URL: https://github.com/apache/pinot/pull/9705#discussion_r1041312232


##########
pinot-tools/src/main/resources/examples/batch/airlineStats/airlineStats_offline_table_config.json:
##########
@@ -40,5 +42,21 @@
         "transformFunction": "fromEpochDays(DaysSinceEpoch)"
       }
     ]
-  }
+  },
+  "tierConfigs": [
+    {

Review Comment:
   Good question. With tierConfigs set in tableConfig, segments will have target tier set accordingly, but nothing happens upon getting new tiers. Because those two configs are needed to turn on the tier migration across multi-dirs. 
   ```
       properties.put("pinot.server.instance.segment.directory.loader", "tierBased"); // this segment loaders knows how to migrate across data paths on servers
       properties.put("controller.segmentRelocator.enableLocalTierMigration", "true"); // this tells servers to migrate data paths
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] klsince commented on a diff in pull request #9705: Allow to configure multi-datadirs as instance configs and a Quickstart example about them

Posted by GitBox <gi...@apache.org>.
klsince commented on code in PR #9705:
URL: https://github.com/apache/pinot/pull/9705#discussion_r1041326586


##########
pinot-tools/src/main/java/org/apache/pinot/tools/MultiDirQuickstart.java:
##########
@@ -0,0 +1,110 @@
+/**
+ * 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.pinot.tools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.pinot.tools.admin.PinotAdministrator;
+import org.apache.pinot.tools.admin.command.QuickstartRunner;
+
+
+/**
+ * A Quickstart to demo how multi directory support works and its typical configs.
+ */
+public class MultiDirQuickstart extends Quickstart {
+  @Override
+  public List<String> types() {
+    return Arrays.asList("OFFLINE_MULTIDIR", "OFFLINE-MULTIDIR", "BATCH_MULTIDIR", "BATCH-MULTIDIR");
+  }
+
+  @Override
+  protected Map<String, Object> getConfigOverrides() {
+    Map<String, Object> properties = new HashMap<>(super.getConfigOverrides());
+    properties.put("pinot.server.instance.segment.directory.loader", "tierBased");
+    properties.put("controller.segment.relocator.frequencyPeriod", "60s");
+    properties.put("controller.segmentRelocator.initialDelayInSeconds", "10");
+    properties.put("controller.segmentRelocator.enableLocalTierMigration", "true");
+    /*
+     * One can also set `dataDir` as part of tierConfigs in TableConfig to overwrite the instance configs (or set as
+     * cluster configs), but it's recommended to use instance (or cluster) configs for consistency across tables.
+     * "tierBackendProperties": {
+     *     "dataDir": "/tmp/multidir_test/hotTier"
+     *  }
+     */
+    properties.put("pinot.server.instance.tierConfigs.0.tierName", "hotTier");
+    properties.put("pinot.server.instance.tierConfigs.0.dataDir", "/tmp/multidir_test/hotTier");
+    properties.put("pinot.server.instance.tierConfigs.1.tierName", "coldTier");
+    properties.put("pinot.server.instance.tierConfigs.1.dataDir", "/tmp/multidir_test/coldTier");

Review Comment:
   right, the part of "0" or "1" can be anything unique.
   
   I think I saw both conventions in pinot configs. I chose this one to avoid worries about escaping name separator and '.' in tier names, which should rare anyway. Will check out FS config.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org