Tabnine Logo
WorkerLoggingContext
Code IndexAdd Tabnine to your IDE (free)

How to use
WorkerLoggingContext
in
co.cask.cdap.logging.context

Best Java code snippets using co.cask.cdap.logging.context.WorkerLoggingContext (Showing top 10 results out of 315)

origin: caskdata/cdap

 @Override
 public String getLogPartition() {
  return String.format("%s:%s", super.getLogPartition(), getSystemTag(TAG_WORKER_ID));
 }
}
origin: caskdata/cdap

public WorkerLoggingContext(String namespaceId, String appId, String workerId, String runId, String instanceId) {
 super(namespaceId, appId, runId);
 setSystemTag(TAG_WORKER_ID, workerId);
 setInstanceId(instanceId);
}
origin: caskdata/cdap

                  tags.get(ServiceLoggingContext.TAG_SERVICE_ID));
} else if (tags.containsKey(WorkerLoggingContext.TAG_WORKER_ID)) {
 return new WorkerLoggingContext(namespaceId, applicationId, tags.get(WorkerLoggingContext.TAG_WORKER_ID),
                 tags.get(ApplicationLoggingContext.TAG_RUN_ID),
                 tags.get(ApplicationLoggingContext.TAG_INSTANCE_ID));
origin: caskdata/cdap

public static LoggingContext getLoggingContext(String namespaceId, String applicationId, String entityId,
                        ProgramType programType, @Nullable String runId,
                        @Nullable Map<String, String> systemArgs) {
 switch (programType) {
  case WORKFLOW:
   return new WorkflowLoggingContext(namespaceId, applicationId, entityId, runId);
  case MAPREDUCE:
   if (systemArgs != null && systemArgs.containsKey("workflowRunId")) {
    String workflowRunId = systemArgs.get("workflowRunId");
    String workflowId = systemArgs.get("workflowName");
    return new WorkflowProgramLoggingContext(namespaceId, applicationId, workflowId, workflowRunId, programType,
                         entityId, runId);
   }
   return new MapReduceLoggingContext(namespaceId, applicationId, entityId, runId);
  case SPARK:
   if (systemArgs != null && systemArgs.containsKey("workflowRunId")) {
    String workflowRunId = systemArgs.get("workflowRunId");
    String workflowId = systemArgs.get("workflowName");
    return new WorkflowProgramLoggingContext(namespaceId, applicationId, workflowId, workflowRunId, programType,
                         entityId, runId);
   }
   return new SparkLoggingContext(namespaceId, applicationId, entityId, runId);
  case SERVICE:
   return new UserServiceLoggingContext(namespaceId, applicationId, entityId, "", runId, null);
  case WORKER:
   return new WorkerLoggingContext(namespaceId, applicationId, entityId, runId, null);
  default:
   throw new IllegalArgumentException(String.format("Illegal entity type for logging context: %s", programType));
 }
}
origin: co.cask.cdap/cdap-watchdog

                  tags.get(ServiceLoggingContext.TAG_SERVICE_ID));
} else if (tags.containsKey(WorkerLoggingContext.TAG_WORKER_ID)) {
 return new WorkerLoggingContext(namespaceId, applicationId, tags.get(WorkerLoggingContext.TAG_WORKER_ID),
                 tags.get(ApplicationLoggingContext.TAG_RUN_ID),
                 tags.get(ApplicationLoggingContext.TAG_INSTANCE_ID));
origin: co.cask.cdap/cdap-watchdog

public WorkerLoggingContext(String namespaceId, String appId, String workerId, String runId, String instanceId) {
 super(namespaceId, appId, runId);
 setSystemTag(TAG_WORKER_ID, workerId);
 setInstanceId(instanceId);
}
origin: co.cask.cdap/cdap-watchdog

 @Override
 public String getLogPartition() {
  return String.format("%s:%s", super.getLogPartition(), getSystemTag(TAG_WORKER_ID));
 }
}
origin: co.cask.cdap/cdap-watchdog

 return new UserServiceLoggingContext(namespaceId, applicationId, entityId, "", runId, null);
case WORKER:
 return new WorkerLoggingContext(namespaceId, applicationId, entityId, runId, null);
default:
 throw new IllegalArgumentException(String.format("Illegal entity type for logging context: %s", programType));
origin: cdapio/cdap

private LoggingContext createLoggingContext(Id.Program programId, RunId runId) {
 return new WorkerLoggingContext(programId.getNamespaceId(), programId.getApplicationId(), programId.getId(),
                 runId.getId(), String.valueOf(getInstanceId()));
}
origin: co.cask.cdap/cdap-app-fabric

private LoggingContext createLoggingContext(Id.Program programId, RunId runId) {
 return new WorkerLoggingContext(programId.getNamespaceId(), programId.getApplicationId(), programId.getId(),
                 runId.getId(), String.valueOf(getInstanceId()));
}
co.cask.cdap.logging.contextWorkerLoggingContext

Javadoc

Logging Context for Worker

Most used methods

  • <init>
  • getSystemTag
  • setInstanceId
  • setSystemTag

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now