Update the partition infos on the assigned resource.

@param partitionInfos for the remote task
5105
private void sendUpdatePartitionInfoRpcCall(
			final Iterable<PartitionInfo> partitionInfos) {

		final LogicalSlot slot = assignedResource;

		if (slot != null) {
			final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway();
			final TaskManagerLocation taskManagerLocation = slot.getTaskManagerLocation();

			CompletableFuture<Acknowledge> updatePartitionsResultFuture = taskManagerGateway.updatePartitions(attemptId, partitionInfos, rpcTimeout);

			updatePartitionsResultFuture.whenCompleteAsync(
				(ack, failure) -> {
					// fail if there was a failure
					if (failure != null) {
						fail(new IllegalStateException("Update task on TaskManager " + taskManagerLocation +
							" failed due to:", failure));
					}
				}, getVertex().getExecutionGraph().getJobMasterMainThreadExecutor());
		}
	}
1067896
public void setStatusInfos(java.util.Collection<DBInstanceStatusInfo> statusInfos) {
        if (statusInfos == null) {
            this.statusInfos = null;
            return;
        }

        this.statusInfos = new java.util.ArrayList<DBInstanceStatusInfo>(statusInfos);
    }
952227
public void updateAckMailboxes(int partition, Set<Long> newHSIds) {
        ImmutableList<Long> replicaHSIds = m_replicasHSIds.get(partition);
        synchronized (m_dataSourcesByPartition) {
            Map<String, ExportDataSource> partitionMap = m_dataSourcesByPartition.get(partition);
            if (partitionMap == null) {
                return;
            }
            for( ExportDataSource eds: partitionMap.values()) {
                eds.updateAckMailboxes(Pair.of(m_mbox, replicaHSIds));
                if (newHSIds != null && !newHSIds.isEmpty()) {
                    // In case of newly joined or rejoined streams miss any RELEASE_BUFFER event,
                    // master stream resends the event when the export mailbox is aware of new streams.
                    eds.forwardAckToNewJoinedReplicas(newHSIds);
                    // After rejoin, new data source may contain the data which current master doesn't have,
                    //  only on master stream if it is blocked by the gap
                    eds.queryForBestCandidate();
                }
            }
        }
    }
121958
public void setNFSFileShareInfoList(java.util.Collection<NFSFileShareInfo> nFSFileShareInfoList) {
        if (nFSFileShareInfoList == null) {
            this.nFSFileShareInfoList = null;
            return;
        }

        this.nFSFileShareInfoList = new com.amazonaws.internal.SdkInternalList<NFSFileShareInfo>(nFSFileShareInfoList);
    }
935748
private void verifyPartitionStateVersion() {
        InternalPartitionService partitionService = getService();
        int localPartitionStateVersion = partitionService.getPartitionStateVersion();
        if (partitionStateVersion != localPartitionStateVersion) {
            if (getNodeEngine().getThisAddress().equals(migrationInfo.getMaster())) {
                return;
            }

            // this is expected when cluster member list changes during migration
            throw new PartitionStateVersionMismatchException(partitionStateVersion, localPartitionStateVersion);
        }
    }
974648
public void setPartitions(java.util.Collection<Partition> partitions) {
        if (partitions == null) {
            this.partitions = null;
            return;
        }

        this.partitions = new java.util.ArrayList<Partition>(partitions);
    }
959943
public void updatePartitionLeader(int partitionId, long newMasterHISD, boolean isLeaderMigrated) {
        PartitionCallback cb = m_callbacks.get(partitionId);
        if (cb != null && cb.m_currentLeader != newMasterHISD) {
            cb.m_previousLeader = cb.m_currentLeader;
            cb.m_currentLeader = newMasterHISD;
            cb.m_isLeaderMigrated = isLeaderMigrated;
        }
    }
15984
public void init(Partition partition) {
        try {

            List<ServerAddress> addressList = new ArrayList<>();

            for (String s : (List<String>) ((DeepPartition) partition).splitWrapper().getReplicas()) {
                addressList.add(new ServerAddress(s));
            }

            //Credentials
            List<MongoCredential> mongoCredentials = new ArrayList<>();

            if (mongoDeepJobConfig.getUsername() != null && mongoDeepJobConfig.getPassword() != null) {
                MongoCredential credential = MongoCredential.createMongoCRCredential(mongoDeepJobConfig.getUsername(),
                        mongoDeepJobConfig.getDatabase(),
                        mongoDeepJobConfig.getPassword().toCharArray());
                mongoCredentials.add(credential);

            }

            mongoClient = new MongoClient(addressList, mongoCredentials);
            mongoClient.setReadPreference(ReadPreference.valueOf(mongoDeepJobConfig.getReadPreference()));
            db = mongoClient.getDB(mongoDeepJobConfig.getDatabase());
            collection = db.getCollection(mongoDeepJobConfig.getCollection());

            dbCursor = collection.find(generateFilterQuery((MongoPartition) partition),
                    mongoDeepJobConfig.getDBFields());

        } catch (UnknownHostException e) {
            throw new DeepExtractorInitializationException(e);
        }
    }
231782
public void setDeploymentGroupsInfo(java.util.Collection<DeploymentGroupInfo> deploymentGroupsInfo) {
        if (deploymentGroupsInfo == null) {
            this.deploymentGroupsInfo = null;
            return;
        }

        this.deploymentGroupsInfo = new com.amazonaws.internal.SdkInternalList<DeploymentGroupInfo>(deploymentGroupsInfo);
    }
995055
protected void clearPartitions() {
		for (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) {
			final HashPartition<BT, PT> p = this.partitionsBeingBuilt.get(i);
			try {
				p.clearAllMemory(this.availableMemory);
			} catch (Exception e) {
				LOG.error("Error during partition cleanup.", e);
			}
		}
		this.partitionsBeingBuilt.clear();
	}
1317073
public void setClusterInfoList(java.util.Collection<ClusterInfo> clusterInfoList) {
        if (clusterInfoList == null) {
            this.clusterInfoList = null;
            return;
        }

        this.clusterInfoList = new java.util.ArrayList<ClusterInfo>(clusterInfoList);
    }
282957
public void setPartitions(java.util.Collection<Double> partitions) {
        if (partitions == null) {
            this.partitions = null;
            return;
        }

        this.partitions = new java.util.ArrayList<Double>(partitions);
    }
462268
@RuleSetup
    public void addPartition(String partitionId, String suffix) {

        this.partitions.put(partitionId, suffix);
    }
1123162
CompletableFuture<Void> update(PartitionMetadata metadata, PartitionManagementService managementService) {
    if (server == null && metadata.members().contains(managementService.getMembershipService().getLocalMember().id())) {
      server = createServer(managementService);
      return server.join(metadata.members());
    } else if (server != null && !metadata.members().contains(managementService.getMembershipService().getLocalMember().id())) {
      return server.leave().thenRun(() -> server = null);
    }
    return CompletableFuture.completedFuture(null);
  }
460087
public void updateByteMetrics() {
    try {
      for (Optional<Fork> fork : this.forks.keySet()) {
        if (fork.isPresent()) {
          fork.get().updateByteMetrics();
        }
      }
    } catch (IOException ioe) {
      LOG.error("Failed to update byte-level metrics for task " + this.taskId, ioe);
    }
  }
701899
public void setFromDiskInfo(java.util.Collection<DiskInfo> fromDiskInfo) {
        if (fromDiskInfo == null) {
            this.fromDiskInfo = null;
            return;
        }

        this.fromDiskInfo = new java.util.ArrayList<DiskInfo>(fromDiskInfo);
    }
828402
private void updateServerInfo() {
		ServerInfo serverInfo = loadBalance.getServerInfo();
		if (serverInfo == null)
			throw new RuntimeException("'serverInfo' is null !");
		setServerHost(serverInfo.getHost());
		setServerPort(serverInfo.getPort());
		log.debug("Update server info . ({})", serverInfo.toString());
	}