コード例 #1
0
 def createConfigureNewSegmentCommand(hostName, cmdLabel, validationOnly):
     segmentInfo = newSegmentInfo[hostName]
     checkNotNone("segmentInfo for %s" % hostName, segmentInfo)
     return gp.ConfigureNewSegment(cmdLabel,
                                   segmentInfo,
                                   newSegments=True,
                                   verbose=gplog.logging_is_verbose(),
                                   batchSize=self.__parallelDegree,
                                   ctxt=gp.REMOTE,
                                   remoteHost=hostName,
                                   validationOnly=validationOnly,
                                   forceoverwrite=self.__forceoverwrite)
コード例 #2
0
    def __updateGpIdFile(self, gpEnv, gpArray, segments):
        segmentByHost = GpArray.getSegmentsByHostName(segments)
        newSegmentInfo = gp.ConfigureNewSegment.buildSegmentInfoForNewSegment(segments)

        cmds = []
        for hostName in segmentByHost.keys():
            segmentInfo = newSegmentInfo[hostName]
            checkNotNone("segmentInfo for %s" % hostName, segmentInfo)
            cmd = gp.ConfigureNewSegment("update gpid file",
                                         segmentInfo,
                                         newSegments=False,
                                         verbose=gplog.logging_is_verbose(),
                                         batchSize=self.__parallelDegree,
                                         ctxt=gp.REMOTE,
                                         remoteHost=hostName,
                                         validationOnly=False,
                                         writeGpIdFileOnly=True)

            cmds.append(cmd)
        self.__runWaitAndCheckWorkerPoolForErrorsAndClear(cmds, "writing updated gpid files")