kmozaid commented on PR #8587:
URL: https://github.com/apache/pinot/pull/8587#issuecomment-1109254853

   > > @kmozaid This is being done as part of opening up upload endpoint for 
realtime segments - in this PR: #8584
   > 
   > ohk, then I can close this PR, right? Also I don't see the below change in 
`RealtimeTableDataManager` , How Server is going to handle `REFRESH_SEGMENT` 
message sent by controller when segment is uploaded? Did you verify that 
segment uploaded are queryable in your code?
   > 
   > ```
   >   @Override
   >   public void addSegment(File indexDir, IndexLoadingConfig 
indexLoadingConfig)
   >       throws Exception {
   >     Schema schema = ZKMetadataProvider.getTableSchema(_propertyStore, 
_tableNameWithType);
   >     addSegment(ImmutableSegmentLoader.load(indexDir, indexLoadingConfig, 
schema));
   >   }
   > ```
   > 
   > JFYI, message which controller send to server -
   > 
   > ```
   > ZnRecord=87e551ff-cc98-4fdf-b861-6be3b8d561bd, 
{CREATE_TIMESTAMP=1650873841979, EXECUTE_START_TIMESTAMP=1650873854007, 
MSG_ID=87e551ff-cc98-4fdf-b861-6be3b8d561bd, MSG_STATE=new, 
MSG_SUBTYPE=REFRESH_SEGMENT, MSG_TYPE=USER_DEFINE_MSG, 
PARTITION_NAME=transcript__0__2__20220425T0634Z, 
RESOURCE_NAME=transcript_REALTIME, RETRY_COUNT=0, SRC_CLUSTER=PinotCluster, 
SRC_INSTANCE_TYPE=PARTICIPANT, SRC_NAME=Controller_localhost_9001, 
TGT_NAME=Server_localhost_8001, TGT_SESSION_ID=1000232d2430120, TIMEOUT=-1, 
segmentName=transcript__0__2__20220425T0634Z, 
tableName=transcript_REALTIME}{}{}, Stat=Stat {_version=0, 
_creationTime=1650873842026, _modifiedTime=1650873842026, _ephemeralOwner=0}
   > ```
   
   Refresh Message is being sent here -
   
https://github.com/apache/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java#L204
   
   Message is being handled here -
   
https://github.com/apache/pinot/blob/master/pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentMessageHandlerFactory.java#L96
   
   This is where Unsupported exception is thrown if you don't add 
implementation of addSegment() method.
   
https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java#L373


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to