获取对应canal instance name 或 mq topic

@param task 任务名, 对应配置名
@return destination
963060
@Override
    public String getDestination(String task) {
        MappingConfig config = rdbMapping.get(task);
        if (config != null) {
            return config.getDestination();
        }
        return null;
    }
1512
public int appendTask(long sourceHSId, TransactionInfoBaseMessage task) throws IOException {
        Preconditions.checkState(compiledSize == 0, "buffer is already compiled");

        final int msgSerializedSize = task.getSerializedSize();
        ensureCapacity(taskHeaderSize() + msgSerializedSize);

        ByteBuffer bb = m_container.b();
        bb.putInt(msgSerializedSize);
        bb.putLong(sourceHSId);

        int limit = bb.limit();
        bb.limit(bb.position() + msgSerializedSize);
        task.flattenToBuffer(bb.slice());
        bb.limit(limit);
        bb.position(bb.position() + msgSerializedSize);

        // Don't allow any further expansion to the underlying buffer
        if (bb.position() + taskHeaderSize() > DEFAULT_BUFFER_SIZE) {
            compile();
            return 0;
        } else {
            return DEFAULT_BUFFER_SIZE - (bb.position() + taskHeaderSize());
        }
    }
627748
public ItemRequest<Task> findById(String task) {
    
        String path = String.format("/tasks/%s", task);
        return new ItemRequest<Task>(this, Task.class, path, "GET");
    }
1173966
public T clicked(final CocoTask<?> task) {
        return clicked(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                query.task(task);
            }
        });
    }
851973
public static CanalConnector newClusterConnector(List<? extends SocketAddress> addresses, String destination,
                                                     String username, String password) {
        ClusterCanalConnector canalConnector = new ClusterCanalConnector(username,
            password,
            destination,
            new SimpleNodeAccessStrategy(addresses));
        canalConnector.setSoTimeout(60 * 1000);
        canalConnector.setIdleTimeout(60 * 60 * 1000);
        return canalConnector;
    }
1195308
private Path getTaskReportsFileFromId(String taskId)
  {
    return new Path(mergePaths(config.getDirectory(), taskId.replace(':', '_') + ".reports.json"));
  }
747589
@GetMapping("/count/{type}/{task}")
    public Map<String, Object> count(@PathVariable String type, @PathVariable String task) {
        return count(type, null, task);
    }
679243
public static Map getComponentMap(DefaultTopologyAssignContext context, Integer task) {
        String componentName = context.getTaskToComponent().get(task);
        ComponentCommon componentCommon = ThriftTopologyUtils.getComponentCommon(context.getSysTopology(), componentName);

        Map componentMap = (Map) JStormUtils.from_json(componentCommon.get_json_conf());
        if (componentMap == null) {
            componentMap = Maps.newHashMap();
        }
        return componentMap;
    }
235191
public static Date getLastScheduled(Object task) {

        if (task instanceof Task) {
            final Task ltask = (Task) task;
            final long last  = ltask.getLastScheduled();

            return (last == 0) ? null
                               : new Date(last);
        } else {
            return null;
        }
    }
259707
public ItemRequest<Task> removeDependencies(String task) {
    
        String path = String.format("/tasks/%s/removeDependencies", task);
        return new ItemRequest<Task>(this, Task.class, path, "POST");
    }
1256022
public static JoinPoint<Exception> fromTasks(Task<?,?>... tasks) {
		JoinPoint<Exception> jp = new JoinPoint<>();
		for (Task<?,?> task : tasks) jp.addToJoin(task.getOutput());
		jp.start();
		return jp;
	}
35312
protected void transmitAtEndOfTask(final Task<Revision> task,
			final Task<Diff> result)
		throws TimeoutException
	{

		this.processingTimeDiff += System.currentTimeMillis() - startTime;

		if (task.getTaskType() == TaskTypes.TASK_FULL
				|| task.getTaskType() == TaskTypes.TASK_PARTIAL_LAST) {

			diffedSize += result.byteSize();

			ArticleInformation info = result.getHeader();
			info.setRevisionCounter(revisionCounter);
			info.setIgnoredRevisionsCounter(ignoredRevisionsCounter);
			info.setDiffedSize(diffedSize);
			info.setDiffPartCounter(diffPartCounter);
			info.setProcessingTimeRead(task.getHeader().getProcessingTimeRead());
			info.setProcessingTimeDiff(processingTimeDiff);
		}

		super.transmitAtEndOfTask(task, result);
	}
725240
public static JavacTrees instance(JavaCompiler.CompilationTask task) {
        if (!(task instanceof BasicJavacTask))
            throw new IllegalArgumentException();
        return instance(((BasicJavacTask)task).getContext());
    }
708196
public CollectionRequest<Task> tags(String task) {
    
        String path = String.format("/tasks/%s/tags", task);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
303024
private Integer getOutlineLevel(Task task)
   {
      String value = task.getWBS();
      Integer result = Integer.valueOf(1);
      if (value != null && value.length() > 0)
      {
         String[] path = WBS_SPLIT_REGEX.split(value);
         result = Integer.valueOf(path.length);
      }
      return result;
   }
798493
private java.util.Map<JobHistory.Keys, String> getLastSuccessfulTaskAttempt(JobHistory.Task task) {
    
    Map<String, JobHistory.TaskAttempt> taskAttempts = task.getTaskAttempts();
    int size = taskAttempts.size();
    java.util.Iterator<Map.Entry<String, JobHistory.TaskAttempt>> kv = taskAttempts.entrySet().iterator();
    for (int i=0; i<size; i++) {
      // CHECK_IT: Only one SUCCESSFUL TASK ATTEMPT
      Map.Entry<String, JobHistory.TaskAttempt> tae = kv.next();
      JobHistory.TaskAttempt attempt = tae.getValue();
      if (attempt.getValues().get(JobHistory.Keys.TASK_STATUS).equals("SUCCESS")) {
        return attempt.getValues();
      }
    }
    
    return null;
  }
1364670
public Cluster destination(final String... destinations) {
        final String applicationName = clusterId.applicationName;
        return destination(Arrays.stream(destinations).map(d -> new ClusterId(applicationName, d)).toArray(ClusterId[]::new));
    }