-
Notifications
You must be signed in to change notification settings - Fork 3k
[TACHYON-62] Netty #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TACHYON-62] Netty #333
Conversation
|
Can one of the admins verify this patch? |
|
Having a hard time debugging why the Anyone have an idea? |
|
OK, found the issue. Decoding was ignoring the type so the block I'd was wrong. Consuming the type fixed the issue |
|
Tests pass locally, will update when I get home |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that DataServerHandler event handler methods
in a different thread than an I/O thread so that the I/O thread is not blocked by
a time-consuming task.
static final EventExecutorGroup group = new DefaultEventExecutorGroup(16); //number of Threads
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("blockRequestDecoder", new BlockRequest.Decoder());
pipeline.addLast("blockRequestEncoder", new BlockResponse.Encoder());
pipeline.addLast(group, "dataServerHandler", new DataServerHandler(locker));|
FYI I just submitted a similar pull request for Spark: apache/spark#1907 I think it does a lot of things you wanted to do. Would be great if you can review that one as well. |
|
Thanks @rxin, I will take a look. I was looking at github.com/twitter/finagle and https://github.com/facebook/nifty as examples, but they are on 3.x, which is very different than 4.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Javadoc to the class declaration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Apache license header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move to MIT? They don't care about this stuff!
=D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
|
@mubarak, @hsaputra, @haoyuan, @rxin I finally did the testing to see how things perform, and have updated the code to reflect it. I think the patch is ready for a first real round of review. I have made a few perf changes that I want to test out tomorrow, but that shouldn't effect the patch as a whole. Few things I want to point out before you guys review:
|
52c3afe to
77b18e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would you need MAPPED ever?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Under some load I was seeing better results. Region is all around better
but thought it would be good to support both if needed.
On Aug 19, 2014 11:56 PM, "Reynold Xin" [email protected] wrote:
In core/src/main/java/tachyon/worker/netty/FileStreamType.java:
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- /
+package tachyon.worker.netty;
+
+/*- * When streaming files over the network, the implementation to use.
- */
+public enum FileStreamType {- /**
- * Create a memory-mapped buffer and send that over the network.
- */
- MAPPED,
why would you need MAPPED ever?
—
Reply to this email directly or view it on GitHub
https://github.com/amplab/tachyon/pull/333/files#r16461112.
…bstract over the implementations
|
@haoyuan, I believe I have addressed all your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but just noticed that if this is not set then the default sets null?
Do you know what Netty sets the socket send buffer if we don't set manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Netty docs redirect to http://docs.oracle.com/javase/7/docs/api/java/net/StandardSocketOptions.html?is-external=true#SO_SNDBUF, which says system dependent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, so I would suggest to just update our doc accordingly to make it clear.
Also not sure if you have seen this link http://fasterdata.es.net/host-tuning/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated config doc to be more descriptive.
|
Do final pass and add comment about socket buffer sizes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note. let them equal to null here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come? Java will give a warning that its not needed.
|
Thanks! |
|
Thanks for adding it! Thanks everyone for the reviews! |
Netty implementation of the data server.
This patch is not done yet. Its intent is to show the work I have right now for commenting.
This PR should not be merged until performance results come in.