LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

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

LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

Aaron Ng
Hello, I am using Alluxio 1.0.1 inside Docker containers. I have masters & workers in separate containers.

To connect my workers to the master, I pass "alluxio.worker.hostname=<worker_ip>". This is to use my own overlay network. If I don't explicitly set my own overlay network IP, it picks up Docker's internal 172.17.0.x IP address, which I don't want.

So far so good. I can read/write to Alluxio FS!

BUT, with alluxio.worker.hostname set, it seems Alluxio can no longer figure out if my client is local. If I do "./bin/alluxio fs copyFromLocal a b", it no longer tries to write to the local worker first. It thinks all workers are remote.

(However, if I don't set alluxio.worker.hostname, LocalFirstPolicy is respected and data zips straight into the local worker's RAM.)



Questions:
  • How does Alluxio figure out if a client is "local"? 
  • What can I do to tell Alluxio that a certain hostname/IP (E.g. alluxio.worker.hostname=10.42.101.129) should be treated as local?

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: LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

Jiří Šimša
Hello Aaron,

The logic for figuring out if client is local can be found in AlluxioBlockStore#getInStream() and AlluxioBlockStore#getOutStream(). Here is the code for Alluxio 1.0.1.

I am not aware of any option that you could pass Alluxio to treat an IP address as local. Can you modify your /etc/hosts so that the canonical hostname for your machine resolves to the IP address of the overlay network?

Best,

On Thu, May 26, 2016 at 11:10 PM, Aaron Ng <[hidden email]> wrote:
Hello, I am using Alluxio 1.0.1 inside Docker containers. I have masters & workers in separate containers.

To connect my workers to the master, I pass "alluxio.worker.hostname=<worker_ip>". This is to use my own overlay network. If I don't explicitly set my own overlay network IP, it picks up Docker's internal 172.17.0.x IP address, which I don't want.

So far so good. I can read/write to Alluxio FS!

BUT, with alluxio.worker.hostname set, it seems Alluxio can no longer figure out if my client is local. If I do "./bin/alluxio fs copyFromLocal a b", it no longer tries to write to the local worker first. It thinks all workers are remote.

(However, if I don't set alluxio.worker.hostname, LocalFirstPolicy is respected and data zips straight into the local worker's RAM.)



Questions:
  • How does Alluxio figure out if a client is "local"? 
  • What can I do to tell Alluxio that a certain hostname/IP (E.g. alluxio.worker.hostname=10.42.101.129) should be treated as local?

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.



--
Jiří Šimša

--
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: LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

Aaron Ng
Thanks Jiri! 

I tried what you said. In 1.0.1, that solved the LocalFirstPolicy detection for the worker, but the client got confused (it gave the error: "No Alluxio worker available for host ")

It works in 1.1.0 though, thanks to qzhong0605's change:
https://github.com/Alluxio/alluxio/pull/2998/files
With that change, Alluxio correctly compares IP addresses on both sides.


On Friday, May 27, 2016 at 7:50:33 AM UTC-7, Jiří Šimša wrote:
Hello Aaron,

The logic for figuring out if client is local can be found in AlluxioBlockStore#getInStream() and AlluxioBlockStore#getOutStream(). Here is the <a href="https://github.com/Alluxio/alluxio/blob/branch-1.0/core/client-internal/src/main/java/alluxio/client/block/AlluxioBlockStore.java" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fblob%2Fbranch-1.0%2Fcore%2Fclient-internal%2Fsrc%2Fmain%2Fjava%2Falluxio%2Fclient%2Fblock%2FAlluxioBlockStore.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6ap_1NYoXQPOoV8_WcfBPJdryPw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fblob%2Fbranch-1.0%2Fcore%2Fclient-internal%2Fsrc%2Fmain%2Fjava%2Falluxio%2Fclient%2Fblock%2FAlluxioBlockStore.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6ap_1NYoXQPOoV8_WcfBPJdryPw&#39;;return true;">code for Alluxio 1.0.1.

I am not aware of any option that you could pass Alluxio to treat an IP address as local. Can you modify your /etc/hosts so that the canonical hostname for your machine resolves to the IP address of the overlay network?

Best,

On Thu, May 26, 2016 at 11:10 PM, Aaron Ng <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="l-YRTc1SBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aaro...@...> wrote:
Hello, I am using Alluxio 1.0.1 inside Docker containers. I have masters & workers in separate containers.

To connect my workers to the master, I pass "alluxio.worker.hostname=<worker_ip>". This is to use my own overlay network. If I don't explicitly set my own overlay network IP, it picks up Docker's internal 172.17.0.x IP address, which I don't want.

So far so good. I can read/write to Alluxio FS!

BUT, with alluxio.worker.hostname set, it seems Alluxio can no longer figure out if my client is local. If I do "./bin/alluxio fs copyFromLocal a b", it no longer tries to write to the local worker first. It thinks all workers are remote.

(However, if I don't set alluxio.worker.hostname, LocalFirstPolicy is respected and data zips straight into the local worker's RAM.)



Questions:
  • How does Alluxio figure out if a client is "local"? 
  • What can I do to tell Alluxio that a certain hostname/IP (E.g. alluxio.worker.hostname=10.42.101.129) should be treated as local?

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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="l-YRTc1SBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">alluxio-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Jiří Šimša
<a href="http://alluxio.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Falluxio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBX05zcSsMVKyYu5VW-WXWhLx2Sg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Falluxio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBX05zcSsMVKyYu5VW-WXWhLx2Sg&#39;;return true;">Alluxio, Inc.

--
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: LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

Haoyuan Li
Great to hear! Did you try the master branch or 1.1.0 RC4 (https://groups.google.com/forum/?fromgroups#!topic/alluxio-users/7ql1riaaIsQ) ?

Cheers,

Haoyuan




On Fri, May 27, 2016 at 5:26 PM, Aaron Ng <[hidden email]> wrote:
Thanks Jiri! 

I tried what you said. In 1.0.1, that solved the LocalFirstPolicy detection for the worker, but the client got confused (it gave the error: "No Alluxio worker available for host ")

It works in 1.1.0 though, thanks to qzhong0605's change:
With that change, Alluxio correctly compares IP addresses on both sides.


On Friday, May 27, 2016 at 7:50:33 AM UTC-7, Jiří Šimša wrote:
Hello Aaron,

The logic for figuring out if client is local can be found in AlluxioBlockStore#getInStream() and AlluxioBlockStore#getOutStream(). Here is the code for Alluxio 1.0.1.

I am not aware of any option that you could pass Alluxio to treat an IP address as local. Can you modify your /etc/hosts so that the canonical hostname for your machine resolves to the IP address of the overlay network?

Best,

On Thu, May 26, 2016 at 11:10 PM, Aaron Ng <[hidden email]> wrote:
Hello, I am using Alluxio 1.0.1 inside Docker containers. I have masters & workers in separate containers.

To connect my workers to the master, I pass "alluxio.worker.hostname=<worker_ip>". This is to use my own overlay network. If I don't explicitly set my own overlay network IP, it picks up Docker's internal 172.17.0.x IP address, which I don't want.

So far so good. I can read/write to Alluxio FS!

BUT, with alluxio.worker.hostname set, it seems Alluxio can no longer figure out if my client is local. If I do "./bin/alluxio fs copyFromLocal a b", it no longer tries to write to the local worker first. It thinks all workers are remote.

(However, if I don't set alluxio.worker.hostname, LocalFirstPolicy is respected and data zips straight into the local worker's RAM.)



Questions:
  • How does Alluxio figure out if a client is "local"? 
  • What can I do to tell Alluxio that a certain hostname/IP (E.g. alluxio.worker.hostname=10.42.101.129) should be treated as local?

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.



--
Jiří Šimša

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: LocalFirstPolicy gets confused when alluxio.worker.hostname is set?

Aaron Ng
I used the 1.1.0 RC4 from here:
http://alluxio.org/downloads/files/1.1.0-RC4/


On Friday, May 27, 2016 at 5:34:11 PM UTC-7, Haoyuan Li wrote:
Great to hear! Did you try the master branch or 1.1.0 RC4 (<a href="https://groups.google.com/forum/?fromgroups#!topic/alluxio-users/7ql1riaaIsQ" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/forum/?fromgroups#!topic/alluxio-users/7ql1riaaIsQ&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/forum/?fromgroups#!topic/alluxio-users/7ql1riaaIsQ&#39;;return true;">https://groups.google.com/forum/?fromgroups#!topic/alluxio-users/7ql1riaaIsQ) ?

Cheers,

Haoyuan



<a href="http://www.alluxio.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.alluxio.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEO-aqdHfZyi6Oxg9lUcWW5v5b4zg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.alluxio.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEO-aqdHfZyi6Oxg9lUcWW5v5b4zg&#39;;return true;">Alluxio, Inc. 

On Fri, May 27, 2016 at 5:26 PM, Aaron Ng <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="UgN6cqZyBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">aaro...@...> wrote:
Thanks Jiri! 

I tried what you said. In 1.0.1, that solved the LocalFirstPolicy detection for the worker, but the client got confused (it gave the error: "No Alluxio worker available for host ")

It works in 1.1.0 though, thanks to qzhong0605's change:
<a href="https://github.com/Alluxio/alluxio/pull/2998/files" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fpull%2F2998%2Ffiles\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHO8pKuy3IXUMRh2s_qn_bHQw8tJg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fpull%2F2998%2Ffiles\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHO8pKuy3IXUMRh2s_qn_bHQw8tJg&#39;;return true;">https://github.com/Alluxio/alluxio/pull/2998/files
With that change, Alluxio correctly compares IP addresses on both sides.


On Friday, May 27, 2016 at 7:50:33 AM UTC-7, Jiří Šimša wrote:
Hello Aaron,

The logic for figuring out if client is local can be found in AlluxioBlockStore#getInStream() and AlluxioBlockStore#getOutStream(). Here is the <a href="https://github.com/Alluxio/alluxio/blob/branch-1.0/core/client-internal/src/main/java/alluxio/client/block/AlluxioBlockStore.java" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fblob%2Fbranch-1.0%2Fcore%2Fclient-internal%2Fsrc%2Fmain%2Fjava%2Falluxio%2Fclient%2Fblock%2FAlluxioBlockStore.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6ap_1NYoXQPOoV8_WcfBPJdryPw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FAlluxio%2Falluxio%2Fblob%2Fbranch-1.0%2Fcore%2Fclient-internal%2Fsrc%2Fmain%2Fjava%2Falluxio%2Fclient%2Fblock%2FAlluxioBlockStore.java\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH6ap_1NYoXQPOoV8_WcfBPJdryPw&#39;;return true;">code for Alluxio 1.0.1.

I am not aware of any option that you could pass Alluxio to treat an IP address as local. Can you modify your /etc/hosts so that the canonical hostname for your machine resolves to the IP address of the overlay network?

Best,

On Thu, May 26, 2016 at 11:10 PM, Aaron Ng <[hidden email]> wrote:
Hello, I am using Alluxio 1.0.1 inside Docker containers. I have masters & workers in separate containers.

To connect my workers to the master, I pass "alluxio.worker.hostname=<worker_ip>". This is to use my own overlay network. If I don't explicitly set my own overlay network IP, it picks up Docker's internal 172.17.0.x IP address, which I don't want.

So far so good. I can read/write to Alluxio FS!

BUT, with alluxio.worker.hostname set, it seems Alluxio can no longer figure out if my client is local. If I do "./bin/alluxio fs copyFromLocal a b", it no longer tries to write to the local worker first. It thinks all workers are remote.

(However, if I don't set alluxio.worker.hostname, LocalFirstPolicy is respected and data zips straight into the local worker's RAM.)



Questions:
  • How does Alluxio figure out if a client is "local"? 
  • What can I do to tell Alluxio that a certain hostname/IP (E.g. alluxio.worker.hostname=10.42.101.129) should be treated as local?

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 alluxio-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Jiří Šimša
<a href="http://alluxio.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Falluxio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBX05zcSsMVKyYu5VW-WXWhLx2Sg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Falluxio.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHBX05zcSsMVKyYu5VW-WXWhLx2Sg&#39;;return true;">Alluxio, Inc.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="UgN6cqZyBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">alluxio-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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.