You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2021/05/26 18:00:53 UTC

[incubator-pinot] branch deep.store.dir.structure updated (48d7602 -> 63c8c3a)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch deep.store.dir.structure
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


 discard 48d7602  Revert deep store directory structure changes after introducing upsert (#6974)
     new 63c8c3a  Fix deep store directory structure (#6976)

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (48d7602)
            \
             N -- N -- N   refs/heads/deep.store.dir.structure (63c8c3a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../metadata/segment/ColumnPartitionMetadata.java  |   4 +-
 .../common/utils/FileUploadDownloadClient.java     |  24 +++
 .../apache/pinot/common/utils/SegmentUtils.java    |  68 +++++++
 .../apache/pinot/controller/ControllerConf.java    |   5 +-
 .../PinotSegmentUploadDownloadRestletResource.java |  70 ++++---
 .../pinot/controller/api/upload/ZKOperator.java    |  55 +++---
 .../helix/ControllerRequestURLBuilder.java         |   4 +-
 .../helix/core/PinotHelixResourceManager.java      |  96 ++++++---
 .../segment/RealtimeSegmentAssignment.java         |  35 ++--
 .../helix/core/util/ZKMetadataUtils.java           |  32 +--
 .../api/PinotSegmentRestletResourceTest.java       |   6 +-
 .../pinot/controller/api/TableViewsTest.java       |   2 +-
 .../controller/api/upload/ZKOperatorTest.java      |  10 +-
 .../helix/ControllerInstanceToggleTest.java        |   2 +-
 .../controller/helix/ControllerSentinelTestV2.java |   6 +-
 .../controller/helix/PinotResourceManagerTest.java |  99 ++++++++--
 .../TableRebalancerClusterStatelessTest.java       |   4 +-
 .../helix/core/retention/RetentionManagerTest.java |   4 +-
 .../controller/utils/SegmentMetadataMockUtils.java |   8 +
 .../validation/ValidationManagerTest.java          |   4 +-
 .../manager/realtime/RealtimeTableDataManager.java |  26 ++-
 .../tests/BaseClusterIntegrationTest.java          |  25 +++
 .../tests/BasicAuthRealtimeIntegrationTest.java    |   6 +-
 .../UpsertTableSegmentUploadIntegrationTest.java   | 219 +++++++++++++++++++++
 ...ll_handling.schema => upsert_table_test.schema} |   4 +-
 .../src/test/resources/upsert_test.tar.gz          | Bin 0 -> 9911 bytes
 .../upsert/PartitionUpsertMetadataManager.java     |   2 +
 .../apache/pinot/spi/utils/CommonConstants.java    |   7 +-
 .../pinot/tools/perf/PerfBenchmarkDriver.java      |   5 +-
 .../pinot/tools/perf/PerfBenchmarkRunner.java      |   2 +-
 30 files changed, 674 insertions(+), 160 deletions(-)
 create mode 100644 pinot-common/src/main/java/org/apache/pinot/common/utils/SegmentUtils.java
 create mode 100644 pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/UpsertTableSegmentUploadIntegrationTest.java
 copy pinot-integration-tests/src/test/resources/{test_null_handling.schema => upsert_table_test.schema} (89%)
 create mode 100644 pinot-integration-tests/src/test/resources/upsert_test.tar.gz

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


[incubator-pinot] 01/01: Fix deep store directory structure (#6976)

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch deep.store.dir.structure
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 63c8c3a9a057dfff033796391a36c000faca6939
Author: Sajjad Moradi <mo...@gmail.com>
AuthorDate: Tue May 25 22:13:32 2021 -0700

    Fix deep store directory structure (#6976)
    
    * Fix deep store directory strucure
    
    * tableName -> rawTableName
    
    * extract raw table name
    
    * fix integration test
---
 .../api/resources/PinotSegmentUploadDownloadRestletResource.java  | 8 ++++----
 .../pinot/controller/helix/ControllerRequestURLBuilder.java       | 4 ++--
 .../pinot/integration/tests/BasicAuthRealtimeIntegrationTest.java | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
index 35a3e07..98383ca 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
@@ -292,7 +292,7 @@ public class PinotSegmentUploadDownloadRestletResource {
                 tableNameWithType);
         zkDownloadUri = downloadUri;
       } else {
-        zkDownloadUri = getZkDownloadURIForSegmentUpload(tableNameWithType, segmentName);
+        zkDownloadUri = getZkDownloadURIForSegmentUpload(rawTableName, segmentName);
       }
 
       // Zk operations
@@ -389,9 +389,9 @@ public class PinotSegmentUploadDownloadRestletResource {
       String tableNameWithType, SegmentMetadata segmentMetadata, String segmentName, String zkDownloadURI,
       boolean moveSegmentToFinalLocation, String crypter)
       throws Exception {
-    URI finalSegmentLocationURI = URIUtils
-        .getUri(ControllerFilePathProvider.getInstance().getDataDirURI().toString(), tableNameWithType,
-            URIUtils.encode(segmentName));
+    String basePath = ControllerFilePathProvider.getInstance().getDataDirURI().toString();
+    String rawTableName = TableNameBuilder.extractRawTableName(tableNameWithType);
+    URI finalSegmentLocationURI = URIUtils.getUri(basePath, rawTableName, URIUtils.encode(segmentName));
     ZKOperator zkOperator = new ZKOperator(_pinotHelixResourceManager, _controllerConf, _controllerMetrics);
     zkOperator.completeSegmentOperations(tableNameWithType, segmentMetadata, finalSegmentLocationURI, uploadedSegmentFile,
         enableParallelPushProtection, headers, zkDownloadURI, moveSegmentToFinalLocation, crypter);
diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestURLBuilder.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestURLBuilder.java
index cea7582..9d3b362 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestURLBuilder.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/ControllerRequestURLBuilder.java
@@ -255,8 +255,8 @@ public class ControllerRequestURLBuilder {
     return StringUtil.join("/", _baseUrl, "tableConfigs", "validate");
   }
 
-  public String forSegmentDownload(String tableNameWithType, String segmentName) {
-    return URIUtils.constructDownloadUrl(_baseUrl, tableNameWithType, segmentName);
+  public String forSegmentDownload(String tableName, String segmentName) {
+    return URIUtils.constructDownloadUrl(_baseUrl, tableName, segmentName);
   }
 
   public String forSegmentDelete(String tableName, String segmentName) {
diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BasicAuthRealtimeIntegrationTest.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BasicAuthRealtimeIntegrationTest.java
index 87eafb6..aa5868b 100644
--- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BasicAuthRealtimeIntegrationTest.java
+++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/BasicAuthRealtimeIntegrationTest.java
@@ -183,7 +183,7 @@ public class BasicAuthRealtimeIntegrationTest extends BaseClusterIntegrationTest
     for (int i = 0; i < offlineSegments.size(); i++) {
       String segment = offlineSegments.get(i).asText();
       Assert.assertTrue(sendGetRequest(_controllerRequestURLBuilder
-          .forSegmentDownload(TableNameBuilder.OFFLINE.tableNameWithType(getTableName()), segment), AUTH_HEADER)
+          .forSegmentDownload(getTableName(), segment), AUTH_HEADER)
           .length() > 200000); // download segment
     }
   }

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