apache pig - Start pig grunt shell and execute commands using c# -
apache pig - Start pig grunt shell and execute commands using c# -
i working on achieving execution of commands on pig grunt shell using c#. able start grunt shell through c# programme using next code:
proc = new process {startinfo = new processstartinfo { filename = pig_bin + "\\pig.cmd", useshellexecute = false, redirectstandarderror = true , redirectstandardoutput = true, redirectstandardinput = true, createnowindow = true } };
i read output , error through next methods , events:
proc.outputdatareceived += proc_outputdatareceived; proc.beginoutputreadline(); proc.errordatareceived += proc_errordatareceived; proc.beginerrorreadline();
but, unable read output line grunt shell. but, lines before "grunt>" lone read.
i pass arguments grunt shell through next command,
proc.standardinput.writeline("dump a;");
i not able pass arguments grunt shell too. java process started when start grunt shell. if end java.exe in command prompt, "outputdatareceived " event nail , "grunt>" obtained.
i hope grunt running java process , hence not able pass , receive arguments , it. there way accomplish it??
apache-pig interactive-shell
Comments
Post a Comment