idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
123,300 | public boolean preVisit ( Operator < ? > node ) { if ( ! this . visitedNodes . add ( node ) ) { return false ; } if ( node instanceof FileDataSinkBase ) { checkFileDataSink ( ( FileDataSinkBase < ? > ) node ) ; } else if ( node instanceof FileDataSourceBase ) { checkFileDataSource ( ( FileDataSourceBase < ? > ) node ) ... | Checks whether the node is correctly connected to its input . |
123,301 | private void checkDataSink ( GenericDataSinkBase < ? > dataSinkContract ) { Operator < ? > input = dataSinkContract . getInput ( ) ; if ( input == null ) { throw new MissingChildException ( ) ; } } | Checks if DataSinkContract is correctly connected . In case that the contract is incorrectly connected a RuntimeException is thrown . |
123,302 | private void checkFileDataSink ( FileDataSinkBase < ? > fileSink ) { String path = fileSink . getFilePath ( ) ; if ( path == null ) { throw new InvalidProgramException ( "File path of FileDataSink is null." ) ; } if ( path . length ( ) == 0 ) { throw new InvalidProgramException ( "File path of FileDataSink is empty str... | Checks if FileDataSink is correctly connected . In case that the contract is incorrectly connected a RuntimeException is thrown . |
123,303 | private void checkFileDataSource ( FileDataSourceBase < ? > fileSource ) { String path = fileSource . getFilePath ( ) ; if ( path == null ) { throw new InvalidProgramException ( "File path of FileDataSource is null." ) ; } if ( path . length ( ) == 0 ) { throw new InvalidProgramException ( "File path of FileDataSource ... | Checks if FileDataSource is correctly connected . In case that the contract is incorrectly connected a RuntimeException is thrown . |
123,304 | private void checkSingleInputContract ( SingleInputOperator < ? , ? , ? > singleInputContract ) { Operator < ? > input = singleInputContract . getInput ( ) ; if ( input == null ) { throw new MissingChildException ( ) ; } } | Checks whether a SingleInputOperator is correctly connected . In case that the contract is incorrectly connected a RuntimeException is thrown . |
123,305 | private void checkDualInputContract ( DualInputOperator < ? , ? , ? , ? > dualInputContract ) { Operator < ? > input1 = dualInputContract . getFirstInput ( ) ; Operator < ? > input2 = dualInputContract . getSecondInput ( ) ; if ( input1 == null || input2 == null ) { throw new MissingChildException ( ) ; } } | Checks whether a DualInputOperator is correctly connected . In case that the contract is incorrectly connected a RuntimeException is thrown . |
123,306 | public O setParallelism ( int dop ) { if ( dop < 1 ) { throw new IllegalArgumentException ( "The parallelism of an operator must be at least 1." ) ; } this . dop = dop ; @ SuppressWarnings ( "unchecked" ) O returnType = ( O ) this ; return returnType ; } | Sets the degree of parallelism for this operator . The degree must be 1 or more . |
123,307 | public static < T > Operator < T > createUnionCascade ( Operator < T > input1 , Operator < T > ... input2 ) { if ( input2 == null || input2 . length == 0 ) { return input1 ; } else if ( input2 . length == 1 && input1 == null ) { return input2 [ 0 ] ; } TypeInformation < T > type = null ; if ( input1 != null ) { type = ... | Takes a single Operator and a list of operators and creates a cascade of unions of this inputs if needed . If not needed there was only one operator as input then this operator is returned . |
123,308 | protected boolean acceptFile ( FileStatus fileStatus ) { final String name = fileStatus . getPath ( ) . getName ( ) ; return ! name . startsWith ( "_" ) && ! name . startsWith ( "." ) ; } | A simple hook to filter files and directories from the input . The method may be overridden . Hadoop s FileInputFormat has a similar mechanism and applies the same filters by default . |
123,309 | public void append ( final byte [ ] data , final int start , final int len ) { final int oldLength = this . bytes . length ; setCapacity ( this . bytes . length + len , true ) ; System . arraycopy ( data , start , this . bytes , oldLength , len ) ; } | Append a range of bytes to the end of the given data . |
123,310 | public static boolean isNonStaticInnerClass ( Class < ? > clazz ) { if ( clazz . getEnclosingClass ( ) == null ) { return false ; } else { if ( clazz . getDeclaringClass ( ) != null ) { return ! Modifier . isStatic ( clazz . getModifiers ( ) ) ; } else { return true ; } } } | Checks whether the class is an inner class that is not statically accessible . That is especially true for anonymous inner classes . |
123,311 | public ManagementGroupVertex getGroupVertex ( final int index ) { if ( index < this . groupVertices . size ( ) ) { return this . groupVertices . get ( index ) ; } return null ; } | Returns the management group vertex with the given index . |
123,312 | void addGroupVertex ( final ManagementGroupVertex groupVertex ) { this . groupVertices . add ( groupVertex ) ; this . managementGraph . addGroupVertex ( groupVertex . getID ( ) , groupVertex ) ; } | Adds the given group vertex to this management stage . |
123,313 | void collectGroupVertices ( final List < ManagementGroupVertex > groupVertices ) { final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { groupVertices . add ( it . next ( ) ) ; } } | Adds all management group vertices contained in this stage to the given list . |
123,314 | void collectVertices ( final List < ManagementVertex > vertices ) { final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { it . next ( ) . collectVertices ( vertices ) ; } } | Adds all management vertices contained in this stage s group vertices to the given list . |
123,315 | public int getNumberOfInputManagementVertices ( ) { int retVal = 0 ; final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { final ManagementGroupVertex groupVertex = it . next ( ) ; if ( groupVertex . isInputVertex ( ) ) { retVal += groupVertex . getNumberOfGrou... | Returns the number of input management vertices in this stage i . e . the number of management vertices which are connected to vertices in a lower stage or have no input channels . |
123,316 | public int getNumberOfOutputManagementVertices ( ) { int retVal = 0 ; final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { final ManagementGroupVertex groupVertex = it . next ( ) ; if ( groupVertex . isOutputVertex ( ) ) { retVal += groupVertex . getNumberOfGr... | Returns the number of output management vertices in this stage i . e . the number of management vertices which are connected to vertices in a higher stage or have no output channels . |
123,317 | public int getNumberOfInputGroupVertices ( ) { int retVal = 0 ; final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { if ( it . next ( ) . isInputVertex ( ) ) { ++ retVal ; } } return retVal ; } | Returns the number of input group vertices in this stage . Input group vertices are those vertices which have incoming edges from group vertices of a lower stage . |
123,318 | public ManagementGroupVertex getInputGroupVertex ( int index ) { final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { final ManagementGroupVertex groupVertex = it . next ( ) ; if ( groupVertex . isInputVertex ( ) ) { if ( index == 0 ) { return groupVertex ; } ... | Returns the input group vertex in this stage with the given index . Input group vertices are those vertices which have incoming edges from group vertices of a lower stage . |
123,319 | public int getNumberOfOutputGroupVertices ( ) { int retVal = 0 ; final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { if ( it . next ( ) . isOutputVertex ( ) ) { ++ retVal ; } } return retVal ; } | Returns the number of output group vertices in this stage . Output group vertices are those vertices which have outgoing edges to group vertices of a higher stage . |
123,320 | public ManagementGroupVertex getOutputGroupVertex ( int index ) { final Iterator < ManagementGroupVertex > it = this . groupVertices . iterator ( ) ; while ( it . hasNext ( ) ) { final ManagementGroupVertex groupVertex = it . next ( ) ; if ( groupVertex . isOutputVertex ( ) ) { if ( index == 0 ) { return groupVertex ; ... | Returns the output group vertex in this stage with the given index . Output group vertices are those vertices which have outgoing edges to group vertices of a higher stage . |
123,321 | public static HardwareDescription extractFromSystem ( ) { int numberOfCPUCores = Runtime . getRuntime ( ) . availableProcessors ( ) ; long sizeOfPhysicalMemory = getSizeOfPhysicalMemory ( ) ; if ( sizeOfPhysicalMemory < 0 ) { sizeOfPhysicalMemory = 1 ; } long sizeOfFreeMemory = getSizeOfFreeMemory ( ) ; return new Hard... | Extracts a hardware description object from the system . |
123,322 | private static long getSizeOfFreeMemory ( ) { float fractionToUse = GlobalConfiguration . getFloat ( ConfigConstants . TASK_MANAGER_MEMORY_FRACTION_KEY , ConfigConstants . DEFAULT_MEMORY_MANAGER_MEMORY_FRACTION ) ; Runtime r = Runtime . getRuntime ( ) ; long max = r . maxMemory ( ) ; long total = r . totalMemory ( ) ; ... | Returns the size of free memory in bytes available to the JVM . |
123,323 | @ SuppressWarnings ( "resource" ) private static long getSizeOfPhysicalMemoryForLinux ( ) { BufferedReader lineReader = null ; try { lineReader = new BufferedReader ( new FileReader ( LINUX_MEMORY_INFO_PATH ) ) ; String line = null ; while ( ( line = lineReader . readLine ( ) ) != null ) { Matcher matcher = LINUX_MEMOR... | Returns the size of the physical memory in bytes on a Linux - based operating system . |
123,324 | private static long getSizeOfPhysicalMemoryForMac ( ) { BufferedReader bi = null ; try { Process proc = Runtime . getRuntime ( ) . exec ( "sysctl hw.memsize" ) ; bi = new BufferedReader ( new InputStreamReader ( proc . getInputStream ( ) ) ) ; String line ; while ( ( line = bi . readLine ( ) ) != null ) { if ( line . s... | Returns the size of the physical memory in bytes on a Mac OS - based operating system |
123,325 | void insertForwardEdge ( final ManagementEdge managementEdge , final int index ) { while ( index >= this . forwardEdges . size ( ) ) { this . forwardEdges . add ( null ) ; } this . forwardEdges . set ( index , managementEdge ) ; } | Adds a new edge which originates at this gate . |
123,326 | void insertBackwardEdge ( final ManagementEdge managementEdge , final int index ) { while ( index >= this . backwardEdges . size ( ) ) { this . backwardEdges . add ( null ) ; } this . backwardEdges . set ( index , managementEdge ) ; } | Adds a new edge which arrives at this gate . |
123,327 | public ManagementEdge getForwardEdge ( final int index ) { if ( index < this . forwardEdges . size ( ) ) { return this . forwardEdges . get ( index ) ; } return null ; } | Returns the edge originating at the given index . |
123,328 | public ManagementEdge getBackwardEdge ( final int index ) { if ( index < this . backwardEdges . size ( ) ) { return this . backwardEdges . get ( index ) ; } return null ; } | Returns the edge arriving at the given index . |
123,329 | private boolean currentGateLeadsToOtherStage ( final TraversalEntry te , final boolean forward ) { final ManagementGroupVertex groupVertex = te . getManagementVertex ( ) . getGroupVertex ( ) ; if ( forward ) { if ( te . getCurrentGate ( ) >= groupVertex . getNumberOfForwardEdges ( ) ) { return false ; } final Managemen... | Checks if the current gate leads to another stage or not . |
123,330 | public RequestedLocalProperties filterByNodesConstantSet ( OptimizerNode node , int input ) { if ( this . ordering != null ) { final FieldList involvedIndexes = this . ordering . getInvolvedIndexes ( ) ; for ( int i = 0 ; i < involvedIndexes . size ( ) ; i ++ ) { if ( ! node . isFieldConstant ( input , involvedIndexes ... | Filters these properties by what can be preserved through a user function s constant fields set . Since interesting properties are filtered top - down anything that partially destroys the ordering makes the properties uninteresting . |
123,331 | public void parameterizeChannel ( Channel channel ) { if ( this . ordering != null ) { channel . setLocalStrategy ( LocalStrategy . SORT , this . ordering . getInvolvedIndexes ( ) , this . ordering . getFieldSortDirections ( ) ) ; } else if ( this . groupedFields != null ) { boolean [ ] dirs = new boolean [ this . grou... | Parameterizes the local strategy fields of a channel such that the channel produces the desired local properties . |
123,332 | public static < T extends Enum < T > > T readEnum ( final DataInput in , final Class < T > enumType ) throws IOException { if ( ! in . readBoolean ( ) ) { return null ; } return T . valueOf ( enumType , StringRecord . readString ( in ) ) ; } | Reads a value from the given enumeration from the specified input stream . |
123,333 | public static void writeEnum ( final DataOutput out , final Enum < ? > enumVal ) throws IOException { if ( enumVal == null ) { out . writeBoolean ( false ) ; } else { out . writeBoolean ( true ) ; StringRecord . writeString ( out , enumVal . name ( ) ) ; } } | Writes a value of an enumeration to the given output stream . |
123,334 | public void set ( final byte [ ] utf8 , final int start , final int len ) { setCapacity ( len , false ) ; System . arraycopy ( utf8 , start , bytes , 0 , len ) ; this . length = len ; this . hash = 0 ; } | Set the Text to range of bytes |
123,335 | private void applyUserDefinedSettings ( final HashMap < AbstractJobVertex , ExecutionGroupVertex > temporaryGroupVertexMap ) throws GraphConversionException { final Iterator < Map . Entry < AbstractJobVertex , ExecutionGroupVertex > > it = temporaryGroupVertexMap . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( )... | Applies the user defined settings to the execution graph . |
123,336 | private void constructExecutionGraph ( final JobGraph jobGraph , final InstanceManager instanceManager ) throws GraphConversionException { final HashMap < AbstractJobVertex , ExecutionVertex > temporaryVertexMap = new HashMap < AbstractJobVertex , ExecutionVertex > ( ) ; final HashMap < AbstractJobVertex , ExecutionGro... | Sets up an execution graph from a job graph . |
123,337 | private void createInitialGroupEdges ( final HashMap < AbstractJobVertex , ExecutionVertex > vertexMap ) throws GraphConversionException { Iterator < Map . Entry < AbstractJobVertex , ExecutionVertex > > it = vertexMap . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { final Map . Entry < AbstractJobVertex , ... | Creates the initial edges between the group vertices |
123,338 | public ExecutionVertex getInputVertex ( final int stage , final int index ) { try { final ExecutionStage s = this . stages . get ( stage ) ; if ( s == null ) { return null ; } return s . getInputExecutionVertex ( index ) ; } catch ( ArrayIndexOutOfBoundsException e ) { return null ; } } | Returns the input vertex with the specified index for the given stage |
123,339 | public ExecutionVertex getVertexByChannelID ( final ChannelID id ) { final ExecutionEdge edge = this . edgeMap . get ( id ) ; if ( edge == null ) { return null ; } if ( id . equals ( edge . getOutputChannelID ( ) ) ) { return edge . getOutputGate ( ) . getVertex ( ) ; } return edge . getInputGate ( ) . getVertex ( ) ; ... | Identifies an execution by the specified channel ID and returns it . |
123,340 | void registerExecutionVertex ( final ExecutionVertex vertex ) { if ( this . vertexMap . put ( vertex . getID ( ) , vertex ) != null ) { throw new IllegalStateException ( "There is already an execution vertex with ID " + vertex . getID ( ) + " registered" ) ; } } | Registers an execution vertex with the execution graph . |
123,341 | private boolean isCurrentStageCompleted ( ) { if ( this . indexToCurrentExecutionStage >= this . stages . size ( ) ) { return true ; } final ExecutionGraphIterator it = new ExecutionGraphIterator ( this , this . indexToCurrentExecutionStage , true , true ) ; while ( it . hasNext ( ) ) { final ExecutionVertex vertex = i... | Checks if the current execution stage has been successfully completed i . e . all vertices in this stage have successfully finished their execution . |
123,342 | private void reconstructExecutionPipelines ( ) { final Iterator < ExecutionStage > it = this . stages . iterator ( ) ; while ( it . hasNext ( ) ) { it . next ( ) . reconstructExecutionPipelines ( ) ; } } | Reconstructs the execution pipelines for the entire execution graph . |
123,343 | private void calculateConnectionIDs ( ) { final Set < ExecutionGroupVertex > alreadyVisited = new HashSet < ExecutionGroupVertex > ( ) ; final ExecutionStage lastStage = getStage ( getNumberOfStages ( ) - 1 ) ; for ( int i = 0 ; i < lastStage . getNumberOfStageMembers ( ) ; ++ i ) { final ExecutionGroupVertex groupVert... | Calculates the connection IDs of the graph to avoid deadlocks in the data flow at runtime . |
123,344 | public void configure ( Configuration parameters ) { this . driverName = parameters . getString ( DRIVER_KEY , null ) ; this . username = parameters . getString ( USERNAME_KEY , null ) ; this . password = parameters . getString ( PASSWORD_KEY , null ) ; this . dbURL = parameters . getString ( URL_KEY , null ) ; this . ... | Configures this JDBCOutputFormat . |
123,345 | public void open ( int taskNumber , int numTasks ) throws IOException { try { establishConnection ( ) ; upload = dbConn . prepareStatement ( query ) ; } catch ( SQLException sqe ) { throw new IllegalArgumentException ( "open() failed:\t!" , sqe ) ; } catch ( ClassNotFoundException cnfe ) { throw new IllegalArgumentExce... | Connects to the target database and initializes the prepared statement . |
123,346 | public void writeToOutput ( final ChannelWriterOutputView output ) throws IOException { int recordsLeft = this . numRecords ; int currentMemSeg = 0 ; while ( recordsLeft > 0 ) { final MemorySegment currentIndexSegment = this . sortIndex . get ( currentMemSeg ++ ) ; int offset = 0 ; if ( recordsLeft >= this . indexEntri... | Writes the records in this buffer in their logical order to the given output . |
123,347 | void addInitialSubtask ( final ExecutionVertex ev ) { if ( ev == null ) { throw new IllegalArgumentException ( "Argument ev must not be null" ) ; } if ( this . initialGroupMemberAdded . compareAndSet ( false , true ) ) { this . groupMembers . add ( ev ) ; } } | Adds the initial execution vertex to this group vertex . |
123,348 | public ExecutionVertex getGroupMember ( final int pos ) { if ( pos < 0 ) { throw new IllegalArgumentException ( "Argument pos must be greater or equal to 0" ) ; } try { return this . groupMembers . get ( pos ) ; } catch ( ArrayIndexOutOfBoundsException e ) { return null ; } } | Returns a specific execution vertex from the list of members . |
123,349 | ExecutionGroupEdge wireTo ( final ExecutionGroupVertex groupVertex , final int indexOfInputGate , final int indexOfOutputGate , final ChannelType channelType , final boolean userDefinedChannelType , final DistributionPattern distributionPattern ) throws GraphConversionException { try { final ExecutionGroupEdge previous... | Wires this group vertex to the specified group vertex and creates a back link . |
123,350 | boolean isWiredTo ( final ExecutionGroupVertex groupVertex ) { final Iterator < ExecutionGroupEdge > it = this . forwardLinks . iterator ( ) ; while ( it . hasNext ( ) ) { final ExecutionGroupEdge edge = it . next ( ) ; if ( edge . getTargetVertex ( ) == groupVertex ) { return true ; } } return false ; } | Checks if this group vertex is wired to the given group vertex . |
123,351 | void createInitialExecutionVertices ( final int initalNumberOfVertices ) throws GraphConversionException { if ( initalNumberOfVertices == this . getCurrentNumberOfGroupMembers ( ) ) { return ; } if ( this . getCurrentNumberOfGroupMembers ( ) != 1 ) { throw new IllegalStateException ( "This method can only be called for... | Creates the initial execution vertices managed by this group vertex . |
123,352 | public void subscribeToEvent ( final EventListener eventListener , final Class < ? extends AbstractTaskEvent > eventType ) { synchronized ( this . subscriptions ) { List < EventListener > subscribers = this . subscriptions . get ( eventType ) ; if ( subscribers == null ) { subscribers = new ArrayList < EventListener > ... | Subscribes the given event listener object to the specified event type . |
123,353 | public void deliverEvent ( AbstractTaskEvent event ) { synchronized ( this . subscriptions ) { List < EventListener > subscribers = this . subscriptions . get ( event . getClass ( ) ) ; if ( subscribers == null ) { return ; } final Iterator < EventListener > it = subscribers . iterator ( ) ; while ( it . hasNext ( ) ) ... | Delivers a event to all of the registered subscribers . |
123,354 | void changeChannelType ( final ChannelType newChannelType ) throws GraphConversionException { if ( ! this . channelType . equals ( newChannelType ) && this . userDefinedChannelType ) { throw new GraphConversionException ( "Cannot overwrite user defined channel type" ) ; } this . channelType = newChannelType ; } | Changes the channel type for this edge . |
123,355 | public void subscribeToEvent ( EventListener eventListener , Class < ? extends AbstractTaskEvent > eventType ) { this . eventHandler . subscribeToEvent ( eventListener , eventType ) ; } | Subscribes the listener object to receive events of the given type . |
123,356 | public void unsubscribeFromEvent ( EventListener eventListener , Class < ? extends AbstractTaskEvent > eventType ) { this . eventHandler . unsubscribeFromEvent ( eventListener , eventType ) ; } | Removes the subscription for events of the given type for the listener object . |
123,357 | public static void checkTransition ( boolean jobManager , String taskName , ExecutionState oldState , ExecutionState newState ) { LOG . info ( ( jobManager ? "JM: " : "TM: " ) + "ExecutionState set from " + oldState + " to " + newState + " for task " + taskName ) ; boolean unexpectedStateChange = true ; if ( oldState =... | Checks the transition of the execution state and outputs an error in case of an unexpected state transition . |
123,358 | protected int getFirstFreeOutputGateIndex ( ) { for ( int i = 0 ; i < this . forwardEdges . size ( ) ; i ++ ) { if ( this . forwardEdges . get ( i ) == null ) { return i ; } } return this . forwardEdges . size ( ) ; } | Returns the index of this vertex s first free output gate . |
123,359 | protected int getFirstFreeInputGateIndex ( ) { for ( int i = 0 ; i < this . backwardEdges . size ( ) ; i ++ ) { if ( this . backwardEdges . get ( i ) == null ) { return i ; } } return this . backwardEdges . size ( ) ; } | Returns the index of this vertex s first free input gate . |
123,360 | private void connectBacklink ( final AbstractJobVertex vertex , final ChannelType channelType , final int indexOfOutputGate , final int indexOfInputGate , DistributionPattern distributionPattern ) { for ( int i = this . backwardEdges . size ( ) ; i <= indexOfInputGate ; i ++ ) { this . backwardEdges . add ( null ) ; } ... | Creates a backward link from a connected job vertex . |
123,361 | public void checkConfiguration ( final AbstractInvokable invokable ) throws IllegalConfigurationException { if ( invokable == null ) { throw new IllegalArgumentException ( "Argument invokable is null" ) ; } try { invokable . checkConfiguration ( ) ; } catch ( IllegalConfigurationException icex ) { throw icex ; } catch ... | Performs task specific checks if the respective task has been configured properly . |
123,362 | @ SuppressWarnings ( "unchecked" ) public O withConstantSetFirst ( String ... constantSetFirst ) { if ( this . udfSemantics == null ) { this . udfSemantics = new DualInputSemanticProperties ( ) ; } SemanticPropUtil . getSemanticPropsDualFromString ( this . udfSemantics , constantSetFirst , null , null , null , null , n... | Adds a constant - set annotation for the first input of the UDF . |
123,363 | @ SuppressWarnings ( "unchecked" ) public O withConstantSetSecond ( String ... constantSetSecond ) { if ( this . udfSemantics == null ) { this . udfSemantics = new DualInputSemanticProperties ( ) ; } SemanticPropUtil . getSemanticPropsDualFromString ( this . udfSemantics , null , constantSetSecond , null , null , null ... | Adds a constant - set annotation for the second input of the UDF . |
123,364 | public boolean hasDeadlock ( List < ? extends PlanNode > sinks ) { this . g = new DeadlockGraph ( ) ; for ( PlanNode s : sinks ) { s . accept ( this ) ; } if ( g . hasCycle ( ) ) { return true ; } else { return false ; } } | Creates new DeadlockGraph from plan and checks for cycles |
123,365 | public ExecutionVertex duplicateVertex ( final boolean preserveVertexID ) { ExecutionVertexID newVertexID ; if ( preserveVertexID ) { newVertexID = this . vertexID ; } else { newVertexID = new ExecutionVertexID ( ) ; } final ExecutionVertex duplicatedVertex = new ExecutionVertex ( newVertexID , this . executionGraph , ... | Returns a duplicate of this execution vertex . |
123,366 | void insertOutputGate ( final int pos , final ExecutionGate outputGate ) { if ( this . outputGates [ pos ] != null ) { throw new IllegalStateException ( "Output gate at position " + pos + " is not null" ) ; } this . outputGates [ pos ] = outputGate ; } | Inserts the output gate at the given position . |
123,367 | void insertInputGate ( final int pos , final ExecutionGate inputGate ) { if ( this . inputGates [ pos ] != null ) { throw new IllegalStateException ( "Input gate at position " + pos + " is not null" ) ; } this . inputGates [ pos ] = inputGate ; } | Inserts the input gate at the given position . |
123,368 | public void updateExecutionStateAsynchronously ( final ExecutionState newExecutionState , final String optionalMessage ) { final Runnable command = new Runnable ( ) { public void run ( ) { updateExecutionState ( newExecutionState , optionalMessage ) ; } } ; this . executionGraph . executeCommand ( command ) ; } | Updates the vertex s current execution state through the job s executor service . |
123,369 | public ExecutionState updateExecutionState ( ExecutionState newExecutionState , final String optionalMessage ) { if ( newExecutionState == null ) { throw new IllegalArgumentException ( "Argument newExecutionState must not be null" ) ; } final ExecutionState currentExecutionState = this . executionState . get ( ) ; if (... | Updates the vertex s current execution state . |
123,370 | private void checkCancelRequestedFlag ( ) { if ( this . cancelRequested . compareAndSet ( true , false ) ) { final TaskCancelResult tsr = cancelTask ( ) ; if ( tsr . getReturnCode ( ) != AbstractTaskResult . ReturnCode . SUCCESS && tsr . getReturnCode ( ) != AbstractTaskResult . ReturnCode . TASK_NOT_FOUND ) { LOG . er... | Checks if another thread requested the vertex to cancel while it was in state STARTING . If so the method clears the respective flag and repeats the cancel request . |
123,371 | public int getNumberOfPredecessors ( ) { int numberOfPredecessors = 0 ; for ( int i = 0 ; i < this . inputGates . length ; ++ i ) { numberOfPredecessors += this . inputGates [ i ] . getNumberOfEdges ( ) ; } return numberOfPredecessors ; } | Returns the number of predecessors i . e . the number of vertices which connect to this vertex . |
123,372 | public int getNumberOfSuccessors ( ) { int numberOfSuccessors = 0 ; for ( int i = 0 ; i < this . outputGates . length ; ++ i ) { numberOfSuccessors += this . outputGates [ i ] . getNumberOfEdges ( ) ; } return numberOfSuccessors ; } | Returns the number of successors i . e . the number of vertices this vertex is connected to . |
123,373 | public TaskSubmissionResult startTask ( ) { final AllocatedResource ar = this . allocatedResource . get ( ) ; if ( ar == null ) { final TaskSubmissionResult result = new TaskSubmissionResult ( getID ( ) , AbstractTaskResult . ReturnCode . NO_INSTANCE ) ; result . setDescription ( "Assigned instance of vertex " + this .... | Deploys and starts the task represented by this vertex on the assigned instance . |
123,374 | public TaskDeploymentDescriptor constructDeploymentDescriptor ( ) { final SerializableArrayList < GateDeploymentDescriptor > ogd = new SerializableArrayList < GateDeploymentDescriptor > ( this . outputGates . length ) ; for ( int i = 0 ; i < this . outputGates . length ; ++ i ) { final ExecutionGate eg = this . outputG... | Constructs a new task deployment descriptor for this vertex . |
123,375 | synchronized AllocatedSlice createSlice ( final InstanceType reqType , final JobID jobID ) { if ( remainingCapacity . getNumberOfComputeUnits ( ) >= reqType . getNumberOfComputeUnits ( ) && remainingCapacity . getNumberOfCores ( ) >= reqType . getNumberOfCores ( ) && remainingCapacity . getMemorySize ( ) >= reqType . g... | Tries to create a new slice on this instance . |
123,376 | synchronized AllocatedSlice removeAllocatedSlice ( final AllocationID allocationID ) { final AllocatedSlice slice = this . allocatedSlices . remove ( allocationID ) ; if ( slice != null ) { this . remainingCapacity = InstanceTypeFactory . construct ( this . remainingCapacity . getIdentifier ( ) , this . remainingCapaci... | Removes the slice identified by the given allocation ID from this instance and frees up the allocated resources . |
123,377 | synchronized List < AllocatedSlice > removeAllAllocatedSlices ( ) { final List < AllocatedSlice > slices = new ArrayList < AllocatedSlice > ( this . allocatedSlices . values ( ) ) ; final Iterator < AllocatedSlice > it = slices . iterator ( ) ; while ( it . hasNext ( ) ) { removeAllocatedSlice ( it . next ( ) . getAllo... | Removes all allocated slices on this instance and frees up their allocated resources . |
123,378 | protected int [ ] getConstantKeySet ( int input ) { Operator < ? > contract = getPactContract ( ) ; if ( contract instanceof AbstractUdfOperator < ? , ? > ) { AbstractUdfOperator < ? , ? > abstractPact = ( AbstractUdfOperator < ? , ? > ) contract ; int [ ] keyColumns = abstractPact . getKeyColumns ( input ) ; if ( keyC... | Returns the key columns for the specific input if all keys are preserved by this node . Null otherwise . |
123,379 | public void addVertex ( final AbstractJobInputVertex inputVertex ) { if ( ! inputVertices . containsKey ( inputVertex . getID ( ) ) ) { inputVertices . put ( inputVertex . getID ( ) , inputVertex ) ; } } | Adds a new input vertex to the job graph if it is not already included . |
123,380 | public void addVertex ( final AbstractJobOutputVertex outputVertex ) { if ( ! outputVertices . containsKey ( outputVertex . getID ( ) ) ) { outputVertices . put ( outputVertex . getID ( ) , outputVertex ) ; } } | Adds a new output vertex to the job graph if it is not already included . |
123,381 | public Iterator < AbstractJobInputVertex > getInputVertices ( ) { final Collection < AbstractJobInputVertex > coll = this . inputVertices . values ( ) ; return coll . iterator ( ) ; } | Returns an iterator to iterate all input vertices registered with the job graph . |
123,382 | public Iterator < AbstractJobOutputVertex > getOutputVertices ( ) { final Collection < AbstractJobOutputVertex > coll = this . outputVertices . values ( ) ; return coll . iterator ( ) ; } | Returns an iterator to iterate all output vertices registered with the job graph . |
123,383 | public Iterator < JobTaskVertex > getTaskVertices ( ) { final Collection < JobTaskVertex > coll = this . taskVertices . values ( ) ; return coll . iterator ( ) ; } | Returns an iterator to iterate all task vertices registered with the job graph . |
123,384 | public AbstractJobVertex [ ] getAllReachableJobVertices ( ) { final Vector < AbstractJobVertex > collector = new Vector < AbstractJobVertex > ( ) ; collectVertices ( null , collector ) ; return collector . toArray ( new AbstractJobVertex [ 0 ] ) ; } | Returns an array of all job vertices than can be reached when traversing the job graph from the input vertices . |
123,385 | public AbstractJobVertex [ ] getAllJobVertices ( ) { int i = 0 ; final AbstractJobVertex [ ] vertices = new AbstractJobVertex [ inputVertices . size ( ) + outputVertices . size ( ) + taskVertices . size ( ) ] ; final Iterator < AbstractJobInputVertex > iv = getInputVertices ( ) ; while ( iv . hasNext ( ) ) { vertices [... | Returns an array of all job vertices that are registered with the job graph . The order in which the vertices appear in the list is not defined . |
123,386 | private void collectVertices ( final AbstractJobVertex jv , final List < AbstractJobVertex > collector ) { if ( jv == null ) { final Iterator < AbstractJobInputVertex > iter = getInputVertices ( ) ; while ( iter . hasNext ( ) ) { collectVertices ( iter . next ( ) , collector ) ; } } else { if ( ! collector . contains (... | Auxiliary method to collect all vertices which are reachable from the input vertices . |
123,387 | public AbstractJobVertex findVertexByID ( final JobVertexID id ) { if ( this . inputVertices . containsKey ( id ) ) { return this . inputVertices . get ( id ) ; } if ( this . outputVertices . containsKey ( id ) ) { return this . outputVertices . get ( id ) ; } if ( this . taskVertices . containsKey ( id ) ) { return th... | Searches for a vertex with a matching ID and returns it . |
123,388 | private boolean includedInJobGraph ( final JobVertexID id ) { if ( this . inputVertices . containsKey ( id ) ) { return true ; } if ( this . outputVertices . containsKey ( id ) ) { return true ; } if ( this . taskVertices . containsKey ( id ) ) { return true ; } return false ; } | Checks if the job vertex with the given ID is registered with the job graph . |
123,389 | public boolean isWeaklyConnected ( ) { final AbstractJobVertex [ ] reachable = getAllReachableJobVertices ( ) ; final AbstractJobVertex [ ] all = getAllJobVertices ( ) ; if ( reachable . length != all . length ) { return false ; } final HashMap < JobVertexID , AbstractJobVertex > tmp = new HashMap < JobVertexID , Abstr... | Checks if the job graph is weakly connected . |
123,390 | public boolean isAcyclic ( ) { final AbstractJobVertex [ ] reachable = getAllReachableJobVertices ( ) ; final HashMap < AbstractJobVertex , Integer > indexMap = new HashMap < AbstractJobVertex , Integer > ( ) ; final HashMap < AbstractJobVertex , Integer > lowLinkMap = new HashMap < AbstractJobVertex , Integer > ( ) ; ... | Checks if the job graph is acyclic . |
123,391 | private boolean tarjan ( final AbstractJobVertex jv , Integer index , final HashMap < AbstractJobVertex , Integer > indexMap , final HashMap < AbstractJobVertex , Integer > lowLinkMap , final Stack < AbstractJobVertex > stack ) { indexMap . put ( jv , Integer . valueOf ( index ) ) ; lowLinkMap . put ( jv , Integer . va... | Auxiliary method implementing Tarjan s algorithm for strongly - connected components to determine whether the job graph is acyclic . |
123,392 | private void readRequiredJarFiles ( final DataInput in ) throws IOException { final int numJars = in . readInt ( ) ; if ( numJars > 0 ) { for ( int i = 0 ; i < numJars ; i ++ ) { final Path p = new Path ( ) ; p . read ( in ) ; this . userJars . add ( p ) ; final long sizeOfJar = in . readLong ( ) ; LibraryCacheManager ... | Reads required JAR files from an input stream and adds them to the library cache manager . |
123,393 | private ExtendedManagementProtocol getJMConnection ( ) throws IOException { String jmHost = config . getString ( ConfigConstants . JOB_MANAGER_IPC_ADDRESS_KEY , null ) ; String jmPort = config . getString ( ConfigConstants . JOB_MANAGER_IPC_PORT_KEY , null ) ; return RPC . getProxy ( ExtendedManagementProtocol . class ... | Sets up a connection to the JobManager . |
123,394 | public String getPreviewPlan ( ) throws ProgramInvocationException { Thread . currentThread ( ) . setContextClassLoader ( this . getUserCodeClassLoader ( ) ) ; List < DataSinkNode > previewPlan ; if ( isUsingProgramEntryPoint ( ) ) { previewPlan = PactCompiler . createPreOptimizedPlan ( getPlan ( ) ) ; } else if ( isUs... | Returns the analyzed plan without any optimizations . |
123,395 | public String getDescription ( ) throws ProgramInvocationException { if ( ProgramDescription . class . isAssignableFrom ( this . mainClass ) ) { ProgramDescription descr ; if ( this . program != null ) { descr = ( ProgramDescription ) this . program ; } else { try { descr = InstantiationUtil . instantiate ( this . main... | Returns the description provided by the Program class . This may contain a description of the plan itself and its arguments . |
123,396 | void registerJob ( final ExecutionGraph eg ) { final Iterator < ExecutionGroupVertex > it = new ExecutionGroupVertexIterator ( eg , true , - 1 ) ; while ( it . hasNext ( ) ) { final ExecutionGroupVertex groupVertex = it . next ( ) ; final InputSplit [ ] inputSplits = groupVertex . getInputSplits ( ) ; if ( inputSplits ... | Registers a new job with the input split tracker . |
123,397 | void unregisterJob ( final ExecutionGraph eg ) { final Iterator < ExecutionVertex > it = new ExecutionGraphIterator ( eg , true ) ; while ( it . hasNext ( ) ) { this . splitMap . remove ( it . next ( ) . getID ( ) ) ; } } | Unregisters a job from the input split tracker . |
123,398 | void addInputSplitToLog ( final ExecutionVertex vertex , final int sequenceNumber , final InputSplit inputSplit ) { final List < InputSplit > inputSplitLog = this . splitMap . get ( vertex . getID ( ) ) ; if ( inputSplitLog == null ) { LOG . error ( "Cannot find input split log for vertex " + vertex + " (" + vertex . g... | Adds the given input split to the vertex s log and stores it under the specified sequence number . |
123,399 | private TaskOperationProtocol getTaskManagerProxy ( ) throws IOException { if ( this . taskManager == null ) { this . taskManager = RPC . getProxy ( TaskOperationProtocol . class , new InetSocketAddress ( getInstanceConnectionInfo ( ) . address ( ) , getInstanceConnectionInfo ( ) . ipcPort ( ) ) , NetUtils . getSocketF... | Creates or returns the RPC stub object for the instance s task manager . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.