apachehadoopflumeflume-ngflume-twitter

Running flume agent to get Twitter data


I have been trying to run a flume agent on my windows system to get twitter data. I am following this blog https://acadgild.com/blog/streaming-twitter-data-using-flume

But, whenever i try to run the flume agent I get the follwing error -

flume-ng agent -n TwitterAgent -f ./conf/flume.conf

E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\flume-ng.ps1 agent -n TwitterAgent -f ./conf/flume.conf

Resolve-Path : Cannot find path 'E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\conf\flume.conf' because it does not exist.
At E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\flume-ng.ps1:217 char:24 +     $confFile = '"' + (Resolve-Path $confFile).Path + '"' +                        ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (E:\apache-flume...conf\flume.conf:String) [Resolve-Path], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

I have tried debugging it on my own, but have failed to do so. I tried to look for this particular error but could not find it anywhere.


Solution

  • Does E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin\bin\conf\flume.conf exist at that location? Are you sure it's in \bin\conf\flume.conf and not \conf\flume.conf? In which case use:

    flume-ng agent -n TwitterAgent -f ./../conf/flume.conf
    

    Or (as is more common), run from the E:\apache-flume-1.7.0-bin\apache-flume-1.7.0-bin folder with the command:

    bin/flume-ng agent -n TwitterAgent -f ./conf/flume.conf