- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.oozie.client.WorkflowAction.getName()
方法的一些代码示例,展示了WorkflowAction.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowAction.getName()
方法的具体详情如下:
包路径:org.apache.oozie.client.WorkflowAction
类名称:WorkflowAction
方法名:getName
[英]Return the action name.
[中]返回操作名称。
代码示例来源:origin: apache/oozie
public static String getActionYarnTag(Configuration conf, String parentId, WorkflowAction wfAction) {
String tag;
if ( conf != null && conf.get(OOZIE_ACTION_YARN_TAG) != null) {
tag = conf.get(OOZIE_ACTION_YARN_TAG) + "@" + wfAction.getName();
} else if (parentId != null) {
tag = parentId + "@" + wfAction.getName();
} else {
tag = wfAction.getId();
}
return tag;
}
代码示例来源:origin: org.apache.oozie/oozie-core
public static String getActionYarnTag(Configuration conf, String parentId, WorkflowAction wfAction) {
String tag;
if ( conf != null && conf.get(OOZIE_ACTION_YARN_TAG) != null) {
tag = conf.get(OOZIE_ACTION_YARN_TAG) + "@" + wfAction.getName();
} else if (parentId != null) {
tag = parentId + "@" + wfAction.getName();
} else {
tag = wfAction.getId();
}
return tag;
}
代码示例来源:origin: apache/oozie
/**
* Return the path that will be used to store action specific data
*
* @param jobId Worfklow ID
* @param action Action
* @param key An Identifier
* @param temp temp directory flag
* @return A string that has the path
*/
protected String getActionDirPath(String jobId, WorkflowAction action, String key, boolean temp) {
String name = jobId + "/" + action.getName() + "--" + key;
if (temp) {
name += ".temp";
}
return getOozieSystemId() + "/" + name;
}
代码示例来源:origin: org.apache.oozie/oozie-core
/**
* Return the path that will be used to store action specific data
*
* @param jobId Worfklow ID
* @param action Action
* @param key An Identifier
* @param temp temp directory flag
* @return A string that has the path
*/
protected String getActionDirPath(String jobId, WorkflowAction action, String key, boolean temp) {
String name = jobId + "/" + action.getName() + "--" + key;
if (temp) {
name += ".temp";
}
return getOozieSystemId() + "/" + name;
}
代码示例来源:origin: org.apache.oozie/oozie-tools
private void storeOozieLauncherLog(final File outputDir, final WorkflowAction action, final String user) {
try (PrintStream fw = new PrintStream(new File(outputDir, "launcher_" + action.getName() + ".log"),
StandardCharsets.UTF_8.toString())) {
final ApplicationId appId = ConverterUtils.toApplicationId(action.getExternalId());
oozieLauncherLogFetcher.dumpAllContainersLogs(appId, user, fw);
} catch (IOException e) {
System.err.printf("Exception occurred during the retrieval of Oozie launcher logs for workflow(s): %s%n",
e.getMessage());
}
}
代码示例来源:origin: apache/oozie
/**
* Creating and forwarding the tag, It will be useful during repeat attempts of Launcher, to ensure only
* one child job is running. Tag is formed as follows:
* For workflow job, tag = action-id
* For Coord job, tag = coord-action-id@action-name (if not part of sub flow), else
* coord-action-id@subflow-action-name@action-name.
* @param conf the conf
* @param wfJob the wf job
* @param action the action
* @return the action yarn tag
*/
public static String getActionYarnTag(Configuration conf, WorkflowJob wfJob, WorkflowAction action) {
if (conf != null && conf.get(OOZIE_ACTION_YARN_TAG) != null) {
return conf.get(OOZIE_ACTION_YARN_TAG) + "@" + action.getName();
}
else if (wfJob.getParentId() != null) {
return wfJob.getParentId() + "@" + action.getName();
}
else {
return action.getId();
}
}
}
代码示例来源:origin: org.apache.oozie/oozie-examples
private static void printWorkflowInfo(WorkflowJob wf) {
System.out.println("Application Path : " + wf.getAppPath());
System.out.println("Application Name : " + wf.getAppName());
System.out.println("Application Status : " + wf.getStatus());
System.out.println("Application Actions:");
for (WorkflowAction action : wf.getActions()) {
System.out.println(MessageFormat.format(" Name: {0} Type: {1} Status: {2}", action.getName(),
action.getType(), action.getStatus()));
}
System.out.println();
}
}
代码示例来源:origin: apache/oozie
private Map<String, WorkflowAction> fillWorkflowActions() {
final Map<String, WorkflowAction> workflowActions = new LinkedHashMap<>();
boolean found = false;
for (final WorkflowAction wfAction : job.getActions()) {
workflowActions.put(wfAction.getName(), wfAction);
if (!found) {
switch (wfAction.getStatus()) {
case KILLED:
case ERROR:
case FAILED:
showKill = true; // Assuming on error the workflow eventually ends with kill node
found = true;
break;
default:
// Look further
break;
}
}
}
return workflowActions;
}
代码示例来源:origin: com.yahoo.oozie/oozie-examples
private static void printWorkflowInfo(WorkflowJob wf) {
System.out.println("Application Path : " + wf.getAppPath());
System.out.println("Application Name : " + wf.getAppName());
System.out.println("Application Status : " + wf.getStatus());
System.out.println("Application Actions:");
for (WorkflowAction action : wf.getActions()) {
System.out.println(MessageFormat.format(" Name: {0} Type: {1} Status: {2}", action.getName(),
action.getType(), action.getStatus()));
}
System.out.println();
}
代码示例来源:origin: org.apache.oozie/oozie-core
private Map<String, WorkflowAction> fillWorkflowActions() {
final Map<String, WorkflowAction> workflowActions = new LinkedHashMap<>();
boolean found = false;
for (final WorkflowAction wfAction : job.getActions()) {
workflowActions.put(wfAction.getName(), wfAction);
if (!found) {
switch (wfAction.getStatus()) {
case KILLED:
case ERROR:
case FAILED:
showKill = true; // Assuming on error the workflow eventually ends with kill node
found = true;
break;
default:
// Look further
break;
}
}
}
return workflowActions;
}
代码示例来源:origin: org.apache.oozie/oozie-tools
private void persistResolvedActionDefinition(final WorkflowAction action, final File resolvedActionsDir) throws IOException {
persistWorkflowDefinition(resolvedActionsDir, action.getName(), action.getConf());
}
代码示例来源:origin: apache/oozie
private Map<String, String> loadExtIds(List<WorkflowAction> actions) {
Map<String, String> extIds = new HashMap<String, String>();
for (WorkflowAction action : actions) {
extIds.put(action.getName(), action.getExternalId());
}
return extIds;
}
代码示例来源:origin: apache/oozie
private void addActionInfo(StringBuffer sb) {
addJobInfo(sb, ACTION_NAME, action.getName());
addJobInfo(sb, ACTION_TYPE, action.getType());
}
代码示例来源:origin: org.apache.oozie/oozie-core
private void addActionInfo(StringBuffer sb) {
addJobInfo(sb, ACTION_NAME, action.getName());
addJobInfo(sb, ACTION_TYPE, action.getType());
}
代码示例来源:origin: YahooArchive/oozie
private void printWorkflowAction(WorkflowAction action, boolean contains) {
System.out.println("ID : " + maskIfNull(action.getId()));
System.out.println(RULER);
System.out.println("Console URL : " + maskIfNull(action.getConsoleUrl()));
System.out.println("Error Code : " + maskIfNull(action.getErrorCode()));
System.out.println("Error Message : " + maskIfNull(action.getErrorMessage()));
System.out.println("External ID : " + maskIfNull(action.getExternalId()));
System.out.println("External Status : " + maskIfNull(action.getExternalStatus()));
System.out.println("Name : " + maskIfNull(action.getName()));
System.out.println("Retries : " + action.getRetries());
System.out.println("Tracker URI : " + maskIfNull(action.getTrackerUri()));
System.out.println("Type : " + maskIfNull(action.getType()));
System.out.println("Started : " + maskDate(action.getStartTime(), contains));
System.out.println("Status : " + action.getStatus());
System.out.println("Ended : " + maskDate(action.getEndTime(), contains));
System.out.println(RULER);
}
代码示例来源:origin: com.yahoo.oozie/oozie-client
private void printWorkflowAction(WorkflowAction action, boolean contains) {
System.out.println("ID : " + maskIfNull(action.getId()));
System.out.println(RULER);
System.out.println("Console URL : " + maskIfNull(action.getConsoleUrl()));
System.out.println("Error Code : " + maskIfNull(action.getErrorCode()));
System.out.println("Error Message : " + maskIfNull(action.getErrorMessage()));
System.out.println("External ID : " + maskIfNull(action.getExternalId()));
System.out.println("External Status : " + maskIfNull(action.getExternalStatus()));
System.out.println("Name : " + maskIfNull(action.getName()));
System.out.println("Retries : " + action.getRetries());
System.out.println("Tracker URI : " + maskIfNull(action.getTrackerUri()));
System.out.println("Type : " + maskIfNull(action.getType()));
System.out.println("Started : " + maskDate(action.getStartTime(), contains));
System.out.println("Status : " + action.getStatus());
System.out.println("Ended : " + maskDate(action.getEndTime(), contains));
System.out.println(RULER);
}
代码示例来源:origin: apache/oozie
@VisibleForTesting
void printWorkflowAction(WorkflowAction action, String timeZoneId, boolean verbose) {
System.out.println("ID : " + maskIfNull(action.getId()));
System.out.println(RULER);
System.out.println("Console URL : " + maskIfNull(action.getConsoleUrl()));
System.out.println("Error Code : " + maskIfNull(action.getErrorCode()));
System.out.println("Error Message : " + maskIfNull(action.getErrorMessage()));
System.out.println("External ID : " + maskIfNull(action.getExternalId()));
System.out.println("External Status : " + maskIfNull(action.getExternalStatus()));
System.out.println("Name : " + maskIfNull(action.getName()));
System.out.println("Retries : " + action.getUserRetryCount());
System.out.println("Tracker URI : " + maskIfNull(action.getTrackerUri()));
System.out.println("Type : " + maskIfNull(action.getType()));
System.out.println("Started : " + maskDate(action.getStartTime(), timeZoneId, verbose));
System.out.println("Status : " + action.getStatus());
System.out.println("Ended : " + maskDate(action.getEndTime(), timeZoneId, verbose));
if (verbose) {
System.out.println("External Stats : " + action.getStats());
System.out.println("External ChildIDs : " + action.getExternalChildIDs());
}
System.out.println(RULER);
}
代码示例来源:origin: apache/oozie
private String getYarnApplicationName(final Context context, final WorkflowAction action, final String prefix) {
return XLog.format("{0}:T={1}:W={2}:A={3}:ID={4}",
prefix,
getType(),
context.getWorkflow().getAppName(),
action.getName(),
context.getWorkflow().getId());
}
代码示例来源:origin: org.apache.oozie/oozie-core
private String getYarnApplicationName(final Context context, final WorkflowAction action, final String prefix) {
return XLog.format("{0}:T={1}:W={2}:A={3}:ID={4}",
prefix,
getType(),
context.getWorkflow().getAppName(),
action.getName(),
context.getWorkflow().getId());
}
代码示例来源:origin: apache/oozie
public void testProperties() {
WorkflowAction action = createNode();
Assert.assertEquals("a", action.getId());
Assert.assertEquals("b", action.getName());
Assert.assertEquals("c", action.getType());
Assert.assertEquals("d", action.getConf());
Assert.assertEquals(WorkflowAction.Status.RUNNING, action.getStatus());
Assert.assertEquals(1, action.getRetries());
Assert.assertEquals(JsonUtils.parseDateRfc822(START_TIME), action.getStartTime());
Assert.assertEquals(JsonUtils.parseDateRfc822(END_TIME), action.getEndTime());
Assert.assertEquals("e", action.getTransition());
Assert.assertEquals("ee", action.getData());
Assert.assertEquals("stats", action.getStats());
Assert.assertEquals("extChIDs", action.getExternalChildIDs());
Assert.assertEquals("f", action.getExternalId());
Assert.assertEquals("g", action.getExternalStatus());
Assert.assertEquals("h", action.getTrackerUri());
Assert.assertEquals("i", action.getConsoleUrl());
Assert.assertEquals("j", action.getErrorCode());
Assert.assertEquals("k", action.getErrorMessage());
}
我认为Thread对象就像是带有名称和静态Thread.CurrentThread()的抽象对象,就像访问Thread对象的方式一样。显然,这是错误的假设。。是这样的吗?
我认为Thread对象就像是带有名称和静态Thread.CurrentThread()的抽象对象,就像访问Thread对象的方式一样。显然,这是错误的假设。。是这样的吗?
public class SynchThread1 extends Thread { SynchThread1 st; SynchThread1() {} SynchThrea
这是代码: import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import jav
特定 Thread 实例的静态 Thread.currentThread().getName() 和 getName() 之间有什么区别? 最佳答案 不同之处在于 getName() 是一个实例方法,
我有类人: class Person{ private String name; public Person(String name) { this.name = na
我想到了一个Thread对象,就像一些带有名称的抽象和静态Thread.currentThread(),就像访问该Thread对象的方式一样。显然,这是错误的假设。。是这样的吗?
我认为Thread对象就像是带有名称和静态Thread.CurrentThread()的抽象对象,就像访问Thread对象的方式一样。显然,这是错误的假设。。是这样的吗?
如标题所示,这两者如何区分?我们可以肯定地说它们是一样的吗?我们什么时候选择一个而不是另一个是最好的情况?我只是碰巧遇到它,我不太确定。我希望有人能消除我的疑虑。提前致谢。 最佳答案 this.Get
如果我要创建所有类型的类型,而不是使用字符串和原始类型,那么最大的缺点是什么? 通常它看起来像: String name = person.getName(); int age = person.ge
这个问题在这里已经有了答案: Returning a const reference to an object instead of a copy (12 个答案) 关闭 8 年前。 现在,这是高度
假设我有一个名为 Foo 的类的实例 abc。当我调用 abc.getClass().getName() 时,我相信我实际上是在调用 Class"".getName()。所以,我的问题是这与 Foo.
以下代码在一个简单的演示中运行,但在我的实际项目中无法编译。 namespace ConsoleApplication1 { class Program { stati
如果我在 C# 枚举中有重复值,说 enum MyE { value1 = 1, value2 = 2, valued = 1 } 以下字符串的值应该是什么? MyE N = (MyE)1
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界. 这篇CFSDN的博客文章PHP getName()函数讲解由作者收集整理,如果你对这篇文章有兴趣
我想从 Magento 导出自定义 XML feed,这是我使用的以下代码: getCollection(); foreach($_products as $_product) { $_result[
只是因为我懒才这么做。我刚刚编写了一个程序,将我所有的音乐列出到一个 Excel 文件中。 import java.io.*; import org.apache.commons.io.F
我的目标是能够覆盖我从 CustomClass.class.getName() 和 CustomClass.getClass().getName() 返回的内容 它应该返回一个自定义值,我认为最好在像
所以我只是不确定如何使用这个方法。我有一个程序可以打印单词、字符和行的计数,但我还希望它在输出此信息之前说出文件名。我已经查看了这方面的信息,但我不确定如何用我的程序来实现这一点。 package p
这个问题已经有答案了: How do I compare strings in Java? (23 个回答) 已关闭 9 年前。 我已经用几种不同的方法对此进行了测试。我比较的字符串s to 与日志文
我是一名优秀的程序员,十分优秀!