Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Apache NiFi Strange OutPut on ExecuteProccessor PowerShell

Highlighted

Apache NiFi Strange OutPut on ExecuteProccessor PowerShell

Contributor

Hi,

I am having a problem/issue for the last 4 days and i am stuck.

So i have a Processor that runs as PowerShell Script :

((Get-Counter -Counter  '\Process(MSTRSvr2_64)\Private Bytes').CounterSamples.CookedValue)

The output at the power-shell cmd line is different than the response i get in NiFi

the Full Cmd is :

$MSTRPrivateBytes = ((Get-Counter -Counter  '\Process(MSTRSvr2_64)\Private Bytes').CounterSamples.CookedValue) 
$HostName = $env:computername 
write-host "MSTRPrivateBytes,HostName=$HostName $MSTRPrivateBytes"

My Execute Stream CMD look like this :

43914-mstr4.png

Is there ant truncate involved ?

If i run manually it gives me the correct result, but in NiFi it is different !!!

I am using the same cmds to get other pointers but they work great only this one is giving me problems.

Any ideas ?

Don't have an account?
Coming from Hortonworks? Activate your account here