This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new a5f8cf4 fix upload LLC segment endpoint truncated download URL (#7361)
a5f8cf4 is described below
commit a5f8cf403b1c939ce788e31e690c64ae942fac50
Author: Chang <[email protected]>
AuthorDate: Tue Aug 24 18:29:05 2021 -0700
fix upload LLC segment endpoint truncated download URL (#7361)
---
.../java/org/apache/pinot/server/api/resources/TablesResource.java | 2 +-
.../src/test/java/org/apache/pinot/server/api/BaseResourceTest.java | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
index f93ebd5..2fccad1 100644
---
a/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
+++
b/pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
@@ -451,7 +451,7 @@ public class TablesResource {
String.format("Failed to upload table %s segment %s to segment
store", realtimeTableName, segmentName),
Response.Status.INTERNAL_SERVER_ERROR);
}
- return segmentDownloadUrl.getPath();
+ return segmentDownloadUrl.toString();
} finally {
FileUtils.deleteQuietly(segmentTarFile);
tableDataManager.releaseSegment(segmentDataManager);
diff --git
a/pinot-server/src/test/java/org/apache/pinot/server/api/BaseResourceTest.java
b/pinot-server/src/test/java/org/apache/pinot/server/api/BaseResourceTest.java
index c327119..a6f0f1f 100644
---
a/pinot-server/src/test/java/org/apache/pinot/server/api/BaseResourceTest.java
+++
b/pinot-server/src/test/java/org/apache/pinot/server/api/BaseResourceTest.java
@@ -33,6 +33,7 @@ import org.apache.helix.HelixManager;
import org.apache.helix.store.zk.ZkHelixPropertyStore;
import org.apache.pinot.common.metrics.ServerMetrics;
import org.apache.pinot.common.utils.LLCSegmentName;
+import org.apache.pinot.common.utils.StringUtil;
import org.apache.pinot.core.data.manager.InstanceDataManager;
import org.apache.pinot.core.data.manager.offline.OfflineTableDataManager;
import org.apache.pinot.core.data.manager.realtime.SegmentUploader;
@@ -76,7 +77,8 @@ public abstract class BaseResourceTest {
protected static final String LLC_SEGMENT_NAME_FOR_UPLOAD_FAILURE =
new
LLCSegmentName(TableNameBuilder.REALTIME.tableNameWithType(TABLE_NAME), 2, 0,
System.currentTimeMillis())
.getSegmentName();
- protected static final String SEGMENT_DOWNLOAD_URL =
"testSegmentDownloadUrl";
+ protected static final String SEGMENT_DOWNLOAD_URL = StringUtil
+ .join("/", "hdfs://root", TABLE_NAME,
LLC_SEGMENT_NAME_FOR_UPLOAD_SUCCESS);
private final Map<String, TableDataManager> _tableDataManagerMap = new
HashMap<>();
protected final List<ImmutableSegment> _realtimeIndexSegments = new
ArrayList<>();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]