Execute copyFromLocal command from java code.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Execute copyFromLocal command from java code.

Md Mahbub Alam
Hi,

Is it possible to execute the copyFromLocal command from java code using write policy? Any code segment suggestion will be appreciated?

thanks

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Execute copyFromLocal command from java code.

Andrew Audibert
You can pass -Dalluxio.user.file.writetype.default=some_write_type to shell commands to customize their write type, e.g.

bin/alluxio fs copyFromLocal LICENSE / -Dalluxio.user.file.writetype.default=CACHE_THROUGH

- Andrew

On Thursday, August 2, 2018 at 8:54:31 AM UTC-7, Md Mahbub Alam wrote:
Hi,

Is it possible to execute the copyFromLocal command from java code using write policy? Any code segment suggestion will be appreciated?

thanks

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Execute copyFromLocal command from java code.

Md Mahbub Alam
Actually I want to transfer the file using SpecificHostPolicy. As my file is in binary format and have some specific constraint, it is not possible to write using the current alluxio.fs.write() function. thats why I create the file using normal java code. So, I want to transfer the file into specific alluxio host, thats why I need to use SpecificHostPolicy. thanks.

On Thursday, August 2, 2018 at 3:37:15 PM UTC-3, [hidden email] wrote:
You can pass -Dalluxio.user.file.writetype.default=some_write_type to shell commands to customize their write type, e.g.

bin/alluxio fs copyFromLocal LICENSE / -Dalluxio.user.file.writetype.default=CACHE_THROUGH

- Andrew

On Thursday, August 2, 2018 at 8:54:31 AM UTC-7, Md Mahbub Alam wrote:
Hi,

Is it possible to execute the copyFromLocal command from java code using write policy? Any code segment suggestion will be appreciated?

thanks

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Execute copyFromLocal command from java code.

Andrew Audibert
When you create the file stream for writing into Alluxio, set the location policy like this:

CreateFileOptions createFileOptions = CreateFileOptions.defaults().setCacheLocationPolicy(new SpecificHostPolicy("preferred_hostname"));
mFileSystem.createFile(dstPath, createFileOptions);

Check out the CpCommand implementation as a reference for using Alluxio's java API to copy a file from local

- Andrew

On Thu, Aug 2, 2018 at 11:50 AM Md Mahbub Alam <[hidden email]> wrote:
Actually I want to transfer the file using SpecificHostPolicy. As my file is in binary format and have some specific constraint, it is not possible to write using the current alluxio.fs.write() function. thats why I create the file using normal java code. So, I want to transfer the file into specific alluxio host, thats why I need to use SpecificHostPolicy. thanks.


On Thursday, August 2, 2018 at 3:37:15 PM UTC-3, [hidden email] wrote:
You can pass -Dalluxio.user.file.writetype.default=some_write_type to shell commands to customize their write type, e.g.

bin/alluxio fs copyFromLocal LICENSE / -Dalluxio.user.file.writetype.default=CACHE_THROUGH

- Andrew

On Thursday, August 2, 2018 at 8:54:31 AM UTC-7, Md Mahbub Alam wrote:
Hi,

Is it possible to execute the copyFromLocal command from java code using write policy? Any code segment suggestion will be appreciated?

thanks

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
--

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.