vishal
02/16/2023, 1:02 PM/segments/{tableName}/startReplaceSegments API in swagger api and trying to replace segment here i am trying to replace one segment with other but i am not bale to do it. i am passing segmentsFrom those segment which we want to replace with new one. segmentsTo is the other segment but before that i have to create and upload that segment. how to create and upload it? i tried to use segment from same table but getting a error as below:
Input:
{
"segmentsTo":["tmptab__4__1__20230214T1305Z"],
"segmentsFrom":["tmptab__0__0__20230214T0611Z"]
}
{
"code": 500,
"error": "Any segments from 'segmentsTo' should not be available in the table at this point. (tableName = 'tmptab_REALTIME', segmentsFrom = '[tmptab__0__0__20230214T0611Z]', segmentsTo = '[tmptab__4__1__20230214T1305Z]', segmentsFromTable = '[tmptab__0__1__20230214T1305Z, tmptab__2__1__20230214T1305Z, tmptab__3__1__20230214T1305Z, tmptab__0__0__20230214T0611Z, tmptab__1__1__20230214T1305Z, tmptab__4__1__20230214T1305Z, tmptab__5__1__20230214T1305Z, tmptab__2__0__20230214T0611Z, tmptab__1__0__20230214T0611Z, tmptab__4__0__20230214T0611Z, tmptab__3__0__20230214T0611Z, tmptab__5__0__20230214T0611Z]')"
}
@saurabh dubey @Xiang Fu @Tim Santos @Xiaobing @Jackie @Kartik Kharesaurabh dubey
02/16/2023, 1:15 PM/segments/{tableName}/startReplaceSegments API, then upload the new segments to the table, then hit the /segments/{tableName}/endReplaceSegments APIvishal
02/16/2023, 1:16 PMsaurabh dubey
02/16/2023, 1:17 PMvishal
02/16/2023, 1:18 PMsaurabh dubey
02/16/2023, 1:19 PMvishal
02/16/2023, 1:20 PMsaurabh dubey
02/16/2023, 1:23 PMvishal
02/16/2023, 1:25 PMsaurabh dubey
02/16/2023, 1:38 PMsaurabh dubey
02/16/2023, 1:38 PMvishal
02/16/2023, 1:39 PMHaitao Zhang
02/17/2023, 7:45 AMvishal
02/17/2023, 9:31 AMvishal
02/17/2023, 10:10 AMcurl -X POST -F segment=@<segment-tar-file-path> <http://controllerHost>:controllerPort/segments
i am trying to use above curl request to create a segment but getting a error that file format is not .gzvishal
02/17/2023, 10:11 AMsaurabh dubey
02/17/2023, 10:27 AMvishal
02/17/2023, 10:27 AM{
"code": 500,
"error": "Exception while uploading segment: Input is not in the .gz format"
}saurabh dubey
02/17/2023, 10:34 AMvishal
02/17/2023, 10:35 AMvishal
02/17/2023, 10:36 AMsaurabh dubey
02/17/2023, 10:37 AMvishal
02/17/2023, 10:37 AMvishal
02/17/2023, 11:06 AMvishal
02/17/2023, 11:06 AMvishal
02/17/2023, 11:06 AMsaurabh dubey
02/17/2023, 11:09 AMbin/pinot-admin.sh CreateSegment -dataDir <input_data_dir> [-format [CSV/JSON/AVRO]] [-readerConfigFile <csv_config_file>] [-generatorConfigFile <generator_config_file>] -segmentName <segment_name> -schemaFile <input_schema_file> -tableName <table_name> -outDir <output_data_dir> [-overwrite]
Maybe you can run this inside some pinot container.
This will generate your segment file. Then push that file using
curl -X POST -F segment=@<segment-tar-file-path> <http://controllerHost>:controllerPort/segmentsvishal
02/17/2023, 11:09 AMvishal
02/17/2023, 11:10 AMjava.lang.IllegalArgumentException: 'tableConfigFile' must be specifiedsaurabh dubey
02/17/2023, 11:10 AMvishal
02/17/2023, 11:10 AMvishal
02/17/2023, 11:11 AMvishal
02/17/2023, 11:11 AMpicocli.CommandLine$UnmatchedArgumentException: Unknown options: '-segmentName', 'json_test_OFFLINE_2', '-tableName', 'json_test_OFFLINE'saurabh dubey
02/17/2023, 11:11 AMvishal
02/17/2023, 11:12 AMsaurabh dubey
02/17/2023, 11:15 AMbin/pinot-admin.sh CreateSegment -dataDir /home/vishalvanpariya/work/tmp/datadir/ -format CSV -schemaFile /home/vishalvanpariya/work/pinot-poc/s3/json-s3/schema.json -tableConfigFile <table config json as a file> -outDir output/saurabh dubey
02/17/2023, 11:15 AMvishal
02/17/2023, 11:40 AMvishal
02/17/2023, 11:40 AMvishal
02/17/2023, 11:40 AMvishal
02/17/2023, 11:40 AMvishal
02/17/2023, 11:40 AMpicocli.CommandLine$UnmatchedArgumentException: Unknown options: '-segmentName', 'json_test_OFFLINE_1'saurabh dubey
02/17/2023, 11:41 AMvishal
02/17/2023, 11:43 AMvishal
02/17/2023, 11:44 AMvishal
02/17/2023, 11:44 AMsaurabh dubey
02/17/2023, 11:45 AMvishal
02/17/2023, 11:59 AMsaurabh dubey
02/17/2023, 12:16 PMvishal
02/21/2023, 6:42 AMvishal
02/21/2023, 6:42 AMdocker run --rm -ti \
--network=pinot-demo \
--name pinot-minion \
-p 8097:8097 \
-e JAVA_OPTS="-Dplugins.dir=/opt/pinot/plugins -Xms4G -Xmx16G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-server.log" \
-d apachepinot/pinot:0.12.0 StartMinion \
-zkAddress pinot-zookeeper:2181
lets say we are starting minion as above can we create segment like this?