You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@apex.apache.org by Hitesh Goyal <hi...@nlpcaptcha.com> on 2016/09/05 07:05:21 UTC

FileWriter not writing contents

Hi team,

I want to write the contents of opearators in a file. For this, I am using FileWriter Operator which takes input from other operator and writes data in the file. I have set the filepath and filename. It is working fine up to the input provided to FileWriter but I am not getting any file on the path which I have provided. Please help me to resolve the issue.

Regards,
Hitesh Goyal
Simpli5d Technologies
Cont No.: 9599803307


Re: FileWriter not writing contents

Posted by Priyanka Gugale <pr...@datatorrent.com>.
What do you mean by path on server? When you run your application on
server, your containers can be deployed on any of the machine in your
cluster. If you are using local file system to write (using protocol
"file"), it will be difficult for you to locate the file also if container
gets redeployed your data will be distributed on different machines in
pieces.

I would suggest if you are running app on cluster then either use hdfs or
some nfs location to write the file.

-Priyanka

On Tue, Sep 6, 2016 at 10:18 AM, Hitesh Goyal <hi...@nlpcaptcha.com>
wrote:

> Hi,
>
>
>
> When I provide the local system path in the properties file, I am getting
> the file on the specified path. But when I provide the path of server, I am
> not getting the file. May this be due to any permission or so ??
>
>
>
> *From:* Munagala Ramanath [mailto:ram@datatorrent.com]
> *Sent:* Monday, September 05, 2016 9:09 PM
> *To:* users@apex.apache.org
> *Subject:* Re: FileWriter not writing contents
>
>
>
> Can you share the code for your file output operator and the properties
> file where
>
> you configure the file path and name  ?
>
>
>
> Please take a look at the examples at https://github.com/
> DataTorrent/examples/tree/master/tutorials
>
> in particular at the "fileIO-simple" example for details on how to
> configure the operator and
>
> sample overrides of the abstract methods.
>
>
>
> Ram
>
>
>
> On Mon, Sep 5, 2016 at 7:17 AM, Sandesh Hegde <sa...@datatorrent.com>
> wrote:
>
> Hello Hitesh,
>
>
>
> Why do you want to write the contents of the operators? How frequently you
> want to write?
>
>
>
> Thanks
>
>
>
> On Mon, Sep 5, 2016 at 12:05 AM Hitesh Goyal <hi...@nlpcaptcha.com>
> wrote:
>
> Hi team,
>
>
>
> I want to write the contents of opearators in a file. For this, I am using
> FileWriter Operator which takes input from other operator and writes data
> in the file. I have set the filepath and filename. It is working fine up to
> the input provided to FileWriter but I am not getting any file on the path
> which I have provided. Please help me to resolve the issue.
>
>
>
> Regards,
>
> *Hitesh Goyal*
>
> Simpli5d Technologies
>
> Cont No.: 9599803307
>
>
>
>
>

RE: FileWriter not writing contents

Posted by Hitesh Goyal <hi...@nlpcaptcha.com>.
Hi,

When I provide the local system path in the properties file, I am getting the file on the specified path. But when I provide the path of server, I am not getting the file. May this be due to any permission or so ??

From: Munagala Ramanath [mailto:ram@datatorrent.com]
Sent: Monday, September 05, 2016 9:09 PM
To: users@apex.apache.org
Subject: Re: FileWriter not writing contents

Can you share the code for your file output operator and the properties file where
you configure the file path and name  ?

Please take a look at the examples at https://github.com/DataTorrent/examples/tree/master/tutorials
in particular at the "fileIO-simple" example for details on how to configure the operator and
sample overrides of the abstract methods.

Ram

On Mon, Sep 5, 2016 at 7:17 AM, Sandesh Hegde <sa...@datatorrent.com>> wrote:
Hello Hitesh,

Why do you want to write the contents of the operators? How frequently you want to write?

Thanks

On Mon, Sep 5, 2016 at 12:05 AM Hitesh Goyal <hi...@nlpcaptcha.com>> wrote:
Hi team,

I want to write the contents of opearators in a file. For this, I am using FileWriter Operator which takes input from other operator and writes data in the file. I have set the filepath and filename. It is working fine up to the input provided to FileWriter but I am not getting any file on the path which I have provided. Please help me to resolve the issue.

Regards,
Hitesh Goyal
Simpli5d Technologies
Cont No.: 9599803307<tel:9599803307>



Re: FileWriter not writing contents

Posted by Munagala Ramanath <ra...@datatorrent.com>.
Can you share the code for your file output operator and the properties
file where
you configure the file path and name  ?

Please take a look at the examples at
https://github.com/DataTorrent/examples/tree/master/tutorials
in particular at the "fileIO-simple" example for details on how to
configure the operator and
sample overrides of the abstract methods.

Ram

On Mon, Sep 5, 2016 at 7:17 AM, Sandesh Hegde <sa...@datatorrent.com>
wrote:

> Hello Hitesh,
>
> Why do you want to write the contents of the operators? How frequently you
> want to write?
>
> Thanks
>
> On Mon, Sep 5, 2016 at 12:05 AM Hitesh Goyal <hi...@nlpcaptcha.com>
> wrote:
>
>> Hi team,
>>
>>
>>
>> I want to write the contents of opearators in a file. For this, I am
>> using FileWriter Operator which takes input from other operator and writes
>> data in the file. I have set the filepath and filename. It is working fine
>> up to the input provided to FileWriter but I am not getting any file on the
>> path which I have provided. Please help me to resolve the issue.
>>
>>
>>
>> Regards,
>>
>> *Hitesh Goyal*
>>
>> Simpli5d Technologies
>>
>> Cont No.: 9599803307
>>
>>
>>
>

Re: FileWriter not writing contents

Posted by Sandesh Hegde <sa...@datatorrent.com>.
Hello Hitesh,

Why do you want to write the contents of the operators? How frequently you
want to write?

Thanks

On Mon, Sep 5, 2016 at 12:05 AM Hitesh Goyal <hi...@nlpcaptcha.com>
wrote:

> Hi team,
>
>
>
> I want to write the contents of opearators in a file. For this, I am using
> FileWriter Operator which takes input from other operator and writes data
> in the file. I have set the filepath and filename. It is working fine up to
> the input provided to FileWriter but I am not getting any file on the path
> which I have provided. Please help me to resolve the issue.
>
>
>
> Regards,
>
> *Hitesh Goyal*
>
> Simpli5d Technologies
>
> Cont No.: 9599803307
>
>
>