private static Map<String, String> createMetricsTags(@Nullable WorkflowProgramInfo workflowProgramInfo) { if (workflowProgramInfo != null) { return workflowProgramInfo.updateMetricsTags(new HashMap<String, String>()); } return Collections.emptyMap(); } }
private static Map<String, String> createMetricsTags(@Nullable WorkflowProgramInfo workflowProgramInfo) { if (workflowProgramInfo != null) { return workflowProgramInfo.updateMetricsTags(new HashMap<String, String>()); } return Collections.emptyMap(); } }
/** * Creates metrics tags to be used for the Spark execution. */ private static Map<String, String> createMetricsTags(@Nullable WorkflowProgramInfo workflowProgramInfo) { Map<String, String> tags = Maps.newHashMap(); // todo: use proper spark instance id. For now we have to emit smth for test framework's waitFor metric to work tags.put(Constants.Metrics.Tag.INSTANCE_ID, "0"); if (workflowProgramInfo != null) { workflowProgramInfo.updateMetricsTags(tags); } return tags; } }
/** * Creates metrics tags to be used for the Spark execution. */ private static Map<String, String> createMetricsTags(@Nullable WorkflowProgramInfo workflowProgramInfo) { Map<String, String> tags = Maps.newHashMap(); // todo: use proper spark instance id. For now we have to emit smth for test framework's waitFor metric to work tags.put(Constants.Metrics.Tag.INSTANCE_ID, "0"); if (workflowProgramInfo != null) { workflowProgramInfo.updateMetricsTags(tags); } return tags; } }
/** * Creates metrics tags to be used for the Spark execution. */ private static Map<String, String> createMetricsTags(@Nullable WorkflowProgramInfo workflowProgramInfo) { Map<String, String> tags = Maps.newHashMap(); // todo: use proper spark instance id. For now we have to emit smth for test framework's waitFor metric to work tags.put(Constants.Metrics.Tag.INSTANCE_ID, "0"); if (workflowProgramInfo != null) { workflowProgramInfo.updateMetricsTags(tags); } return tags; } }
public BasicCustomActionContext(Program workflow, ProgramOptions programOptions, CConfiguration cConf, CustomActionSpecification customActionSpecification, WorkflowProgramInfo workflowProgramInfo, MetricsCollectionService metricsCollectionService, DatasetFramework datasetFramework, TransactionSystemClient txClient, DiscoveryServiceClient discoveryServiceClient, @Nullable PluginInstantiator pluginInstantiator, SecureStore secureStore, SecureStoreManager secureStoreManager, MessagingService messagingService, MetadataReader metadataReader, MetadataPublisher metadataPublisher, NamespaceQueryAdmin namespaceQueryAdmin) { super(workflow, programOptions, cConf, customActionSpecification.getDatasets(), datasetFramework, txClient, discoveryServiceClient, false, metricsCollectionService, workflowProgramInfo.updateMetricsTags(new HashMap<>()), secureStore, secureStoreManager, messagingService, pluginInstantiator, metadataReader, metadataPublisher, namespaceQueryAdmin); this.customActionSpecification = customActionSpecification; this.workflowProgramInfo = workflowProgramInfo; }
public BasicCustomActionContext(Program workflow, ProgramOptions programOptions, CConfiguration cConf, CustomActionSpecification customActionSpecification, WorkflowProgramInfo workflowProgramInfo, MetricsCollectionService metricsCollectionService, DatasetFramework datasetFramework, TransactionSystemClient txClient, DiscoveryServiceClient discoveryServiceClient, @Nullable PluginInstantiator pluginInstantiator, SecureStore secureStore, SecureStoreManager secureStoreManager, MessagingService messagingService, MetadataReader metadataReader, MetadataPublisher metadataPublisher) { super(workflow, programOptions, cConf, customActionSpecification.getDatasets(), datasetFramework, txClient, discoveryServiceClient, false, metricsCollectionService, workflowProgramInfo.updateMetricsTags(new HashMap<String, String>()), secureStore, secureStoreManager, messagingService, pluginInstantiator, metadataReader, metadataPublisher); this.customActionSpecification = customActionSpecification; this.workflowProgramInfo = workflowProgramInfo; }
private static Map<String, String> createMetricsTags(ProgramOptions programOptions, @Nullable String taskId, @Nullable MapReduceMetrics.TaskType type, @Nullable WorkflowProgramInfo workflowProgramInfo) { Map<String, String> tags = Maps.newHashMap(); if (type != null) { tags.put(Constants.Metrics.Tag.MR_TASK_TYPE, type.getId()); if (taskId != null) { String taskMetricsPreference = programOptions.getUserArguments().asMap().get(SystemArguments.METRICS_CONTEXT_TASK_INCLUDED); boolean taskLevelPreference = taskMetricsPreference == null ? false : Boolean.valueOf(taskMetricsPreference); if (taskLevelPreference) { tags.put(Constants.Metrics.Tag.INSTANCE_ID, taskId); } } } if (workflowProgramInfo != null) { workflowProgramInfo.updateMetricsTags(tags); } return tags; }
private static Map<String, String> createMetricsTags(ProgramOptions programOptions, @Nullable String taskId, @Nullable MapReduceMetrics.TaskType type, @Nullable WorkflowProgramInfo workflowProgramInfo) { Map<String, String> tags = Maps.newHashMap(); if (type != null) { tags.put(Constants.Metrics.Tag.MR_TASK_TYPE, type.getId()); if (taskId != null) { String taskMetricsPreference = programOptions.getUserArguments().asMap().get(SystemArguments.METRICS_CONTEXT_TASK_INCLUDED); boolean taskLevelPreference = taskMetricsPreference == null ? true : Boolean.valueOf(taskMetricsPreference); if (taskLevelPreference) { tags.put(Constants.Metrics.Tag.INSTANCE_ID, taskId); } } } if (workflowProgramInfo != null) { workflowProgramInfo.updateMetricsTags(tags); } return tags; }