Class ConsistentDataPushUtils


  • public class ConsistentDataPushUtils
    extends Object
    • Method Detail

      • postUpload

        public static void postUpload​(SegmentGenerationJobSpec spec,
                                      Map<URI,​String> uriToLineageEntryIdMap)
                               throws Exception
        uriToLineageEntryIdMap is non-empty if and only if consistent data push is enabled. If uriToLineageEntryIdMap is non-empty, end the consistent data push protocol for each controller.
        Throws:
        Exception
      • getStartReplaceSegmentUris

        public static Map<URI,​URI> getStartReplaceSegmentUris​(SegmentGenerationJobSpec spec,
                                                                    String rawTableName)
        Builds a map of controller URI to startReplaceSegments URI for each Pinot cluster in the spec.
      • handleUploadException

        public static void handleUploadException​(SegmentGenerationJobSpec spec,
                                                 Map<URI,​String> uriToLineageEntryIdMap,
                                                 Exception exception)
        Revert segment lineage entry when exception gets caught. This revert request is called at best effort. If the revert call fails at this point, the next startReplaceSegment call will do the cleanup by marking the previous entry to "REVERTED" and cleaning up the leftover segments.
      • consistentDataPushEnabled

        public static boolean consistentDataPushEnabled​(TableConfig tableConfig)
      • configureSegmentPostfix

        public static void configureSegmentPostfix​(SegmentGenerationJobSpec spec)
        Append current timestamp to existing configured segment name postfix, if configured, to make segment name unique.