小编Suv*_*yil的帖子

使用Oozie工作流程和协调器 - E0302:参数错误无效

我正在尝试使用协调器运行工作流,但是当我尝试将工作流和协调器XML文件路径设置在一起时,我收到错误.这就是我的jobs.properties文件的样子:

nameNode=hdfs://10.74.6.155:9000
jobTracker=10.74.6.155:9010
queueName=default
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/${user.name}/examples/apps/test/
oozie.coord.application.path=${nameNode}/user/${user.name}/examples/apps/test/
Run Code Online (Sandbox Code Playgroud)

当我使用命令行运行我的工作流程时:

bin\oozie job -oozie http://localhost:11000/oozie -config examples\apps\test\job.properties -run
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Error: E0302 : E0302: Invalid parameter [{0}]
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

谢谢!

hadoop oozie oozie-coordinator

1
推荐指数
1
解决办法
4598
查看次数

sleep()会干扰scanf()吗?

我有两个主题

xThread :在控制台上连续打印X.

inputThread:从stdin获取输入

当用户输入"C"或"c"时,连续打印停止

#include<stdio.h>
#include<sys/select.h>
#include<pthread.h>
#define S sleep(0)

int read_c = 0;
pthread_mutex_t read_c_mutex = PTHREAD_MUTEX_INITIALIZER;

void* inputThread_fn(void* arg)
{
char inputChar;

while(1)
{
    S;

    printf("\nChecking input");
    scanf("%c",&inputChar);
    if(inputChar=='C' || inputChar == 'c')
    {
    pthread_mutex_trylock(&read_c_mutex); /*<--This must be _lock ?
    because with the use of trylock even If i don't aquire a lock I go ahead and modify
    the variable?*/
        read_c = 1;
    pthread_mutex_unlock(&read_c_mutex);        
    pthread_exit(NULL);
    }
}

}

void* xThread_fn(void* arg)
{
    while(1)
    {
        S;
    pthread_mutex_trylock(&read_c_mutex); …
Run Code Online (Sandbox Code Playgroud)

c linux sleep pthreads scanf

1
推荐指数
1
解决办法
617
查看次数

在Unix下不能使用C语言

我试图在Unix下使用gets函数在C语言中输入一个字符串,它不起作用!

它显示以下警告:

warning: the `gets' function is dangerous and should not be used.
Run Code Online (Sandbox Code Playgroud)

如果我运行程序,我不会得到输入字段.代码是

#include<stdio.h>

int main()
{
 int i;
 char ch,newfile[10],content[100];
 FILE *create;
 printf("Enter New File Name to Create : ");
 scanf("%s",newfile);
 create=fopen(newfile,"w+");
 printf("\nEnter Contents for %s : ",newfile);
 //fgets(content,sizeof content,stdin);
 //scanf("%s",&content);
 //gets(content);
 for(i=0;i<100;i++)
 {
   if(content[i]!='\0')
   {
    ch=content[i];
    putc(ch,create);
   }
 else
   break;
 }
 printf("\nYour File Is Created\n");

 return 0;
} 
Run Code Online (Sandbox Code Playgroud)

有人帮我解决这个问题.我评论过我试过的所有可能性.谢谢!

c

0
推荐指数
1
解决办法
590
查看次数

向 Hive 添加逗号分隔表

我有一个非常基本的问题:如何向 Hive 添加一个非常简单的表。我的表保存在保存在 HDFS 中的文本文件 (.txt) 中。我试图在 Hive 中创建一个外部表,它指出了这个文件,但是当我运行 SQL 查询(select * from table_name)时,我没有得到任何输出。这是一个示例代码:

create external table Data (
    dummy INT,
    account_number INT, 
    balance INT, 
    firstname STRING, 
    lastname STRING, 
    age INT, 
    gender CHAR(1), 
    address STRING, 
    employer STRING, 
    email STRING,
    city STRING, 
    state CHAR(2)
)
LOCATION 'hdfs:///KibTEst/Data.txt';
Run Code Online (Sandbox Code Playgroud)

KibTEst/Data.txt 是 HDFS 中文本文件的路径。

表中的行用回车分隔,列用逗号分隔。

谢谢你的帮助!

hive hdfs

0
推荐指数
1
解决办法
6722
查看次数

'%'和格式说明符之间的数字在scanf中的含义是什么?

我知道格式说明符中使用的选项printf(),但我完全不知道%3d可能意味着什么,如下面的代码中所示.

scanf("%3d %3d",&num1,&num2);
Run Code Online (Sandbox Code Playgroud)

一般来说,scanf语句中的数字%format specifier指示之间的数字是什么.

是不是scanf()简单地接收输入并将其存储在参数中指定的地址中?

c scanf

-1
推荐指数
1
解决办法
5256
查看次数

标签 统计

c ×3

scanf ×2

hadoop ×1

hdfs ×1

hive ×1

linux ×1

oozie ×1

oozie-coordinator ×1

pthreads ×1

sleep ×1