You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ki...@apache.org on 2019/12/25 19:40:03 UTC
[incubator-pinot] branch fix-create-segment created (now c105dfb)
This is an automated email from the ASF dual-hosted git repository.
kishoreg pushed a change to branch fix-create-segment
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.
at c105dfb Fixing CreateSegment and quickstart
This branch includes the following new commits:
new c105dfb Fixing CreateSegment and quickstart
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[incubator-pinot] 01/01: Fixing CreateSegment and quickstart
Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kishoreg pushed a commit to branch fix-create-segment
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit c105dfbe61df6497cedf62cd185f1fe32955cf57
Author: kishoreg <g....@gmail.com>
AuthorDate: Wed Dec 25 11:39:39 2019 -0800
Fixing CreateSegment and quickstart
---
pinot-tools/src/main/java/org/apache/pinot/tools/Quickstart.java | 2 +-
.../apache/pinot/tools/admin/command/CreateSegmentCommand.java | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/Quickstart.java b/pinot-tools/src/main/java/org/apache/pinot/tools/Quickstart.java
index 6c2538e..a5fbf59 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/Quickstart.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/Quickstart.java
@@ -201,7 +201,7 @@ public class Quickstart {
printStatus(Color.YELLOW, prettyPrintResponse(runner.runQuery(q5)));
printStatus(Color.GREEN, "***************************************************");
- printStatus(Color.GREEN, "You can always go to http://localhost:9000/query/ to play around in the query console");
+ printStatus(Color.GREEN, "You can always go to http://localhost:9000/query to play around in the query console");
}
public static void main(String[] args)
diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/CreateSegmentCommand.java b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/CreateSegmentCommand.java
index 60079bd..b948f05 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/CreateSegmentCommand.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/CreateSegmentCommand.java
@@ -406,17 +406,19 @@ public class CreateSegmentCommand extends AbstractBaseAdminCommand implements Co
dataDirPath.getFileSystem(new Configuration()).copyToLocalFile(dataFilePath, localFilePath);
config.setInputFilePath(localFile);
config.setSegmentName(_segmentName + "_" + segCnt);
+ Schema schema = Schema.fromFile(new File(_schemaFile));
+ config.setSchema(schema);
final SegmentIndexCreationDriverImpl driver = new SegmentIndexCreationDriverImpl();
switch (config.getFormat()) {
case PARQUET:
RecordReader parquetRecordReader = new ParquetRecordReader();
- parquetRecordReader.init(new File(localFile), Schema.fromFile(new File(_schemaFile)), null);
+ parquetRecordReader.init(new File(localFile), schema, null);
driver.init(config, parquetRecordReader);
break;
case ORC:
RecordReader orcRecordReader = new ORCRecordReader();
- orcRecordReader.init(new File(localFile), Schema.fromFile(new File(_schemaFile)), null);
+ orcRecordReader.init(new File(localFile), schema, null);
driver.init(config, orcRecordReader);
break;
case CSV:
@@ -425,7 +427,7 @@ public class CreateSegmentCommand extends AbstractBaseAdminCommand implements Co
if (_readerConfigFile != null) {
readerConfig = JsonUtils.fileToObject(new File(_readerConfigFile), CSVRecordReaderConfig.class);
}
- csvRecordReader.init(new File(localFile), Schema.fromFile(new File(_schemaFile)), readerConfig);
+ csvRecordReader.init(new File(localFile), schema, readerConfig);
driver.init(config, csvRecordReader);
break;
default:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org