[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640528#comment-16640528 ] Naveen Gangam commented on THRIFT-4499: --- [~jking3] Thank you for the info. Actually having at the connection level does make sense rather than for every request. Hive does close the connection when the session is closed. Do you have any pointers to sample code that might already be doing this? Thanks in advance. > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Assignee: James E. King III >Priority: Trivial > Fix For: 0.12.0 > > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640341#comment-16640341 ] ASF GitHub Bot commented on THRIFT-4499: jeking3 closed pull request #1607: THRIFT-4499: Remove Magic Number In TFIleTransport (BELUGA BEHR) URL: https://github.com/apache/thrift/pull/1607 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/lib/java/src/org/apache/thrift/transport/TFileTransport.java b/lib/java/src/org/apache/thrift/transport/TFileTransport.java index 915fa7328f..c011c52a79 100644 --- a/lib/java/src/org/apache/thrift/transport/TFileTransport.java +++ b/lib/java/src/org/apache/thrift/transport/TFileTransport.java @@ -366,7 +366,7 @@ public void open() throws TTransportException { currentEvent_ = new Event(new byte [256]); if(!readOnly_) -outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream(), 8192); +outputStream_ = new BufferedOutputStream(inputFile_.getOutputStream()); } catch (IOException iox) { throw new TTransportException(TTransportException.NOT_OPEN, iox); } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Assignee: James E. King III >Priority: Trivial > Fix For: 0.12.0 > > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640340#comment-16640340 ] James E. King III commented on THRIFT-4499: --- Thrift requests are stateless and thrift currently provides no facility for you to correlate a request to a connection. To do this you will need to modify the library. If I were going to do this in C++ I would stick some unique connection identifier into TLS and then provide a way for the handler to get it, and perhaps even to stuff something away in there as well, but when the connection disappears all the TLS data would be removed (so it wouldn't leak). > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Assignee: James E. King III >Priority: Trivial > Fix For: 0.12.0 > > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640093#comment-16640093 ] Naveen Gangam commented on THRIFT-4499: --- [~jking3] I have created a pull request for the proposed change (apologize for the bad description, I did not realize it would post the default text). Could you review when you get a chance? I have a question on an unrelated topic. Apache Hive uses thrift for both HiveServer2 service and Hive Metastore Server (separate java processes that are both thrift-enabled services). I am looking for means to inject some context into every thrift request to the HMS Server, that could be retrieved and logged on the HMS side. This enables us to co-relate the query on the hiveserver side with the metadata requests on the HMS side. For example, I could pass in a string query ID from HS2 to HMS and print that id on HMS logs. I am looking to accomplish this without having to change the existing thrift service APIs. I dont want to change every API to take an additional argument. Does thrift currently have any provision for this? Any help greatly appreciated. Thank you > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640082#comment-16640082 ] ASF GitHub Bot commented on THRIFT-4499: nrg4878 opened a new pull request #1607: THRIFT-4499: Remove Magic Number In TFIleTransport (BELUGA BEHR) URL: https://github.com/apache/thrift/pull/1607 Some helpful tips for a successful Apache Thrift PR: * Did you test your changes locally or using CI in your fork? * Is the Apache Jira THRIFT ticket identifier in the PR title? * Is the Apache Jira THRIFT ticket identifier in the commit message? * Did you squash your changes to a single commit? * Are these changes backwards compatible? (please say so in PR description) * Do you need to update the language-specific README? Example ideal pull request title: THRIFT-: an example pull request title Example ideal commit message: THRIFT-: [summary of fix, one line if possible] Client: [language(s) affected, comma separated, use lib/ directory names please] For more information about committing, see CONTRIBUTING.md This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613986#comment-16613986 ] Jens Geyer commented on THRIFT-4499: [~ngangam]: The docs are over here [http://thrift.apache.org/docs/HowToContribute] Although we prefer PRs via Github, there has been no officcial decision to not accept patch files anymore, so that should be fine. > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613813#comment-16613813 ] Naveen Gangam commented on THRIFT-4499: --- [~jking3] I work Apache Hive project and I have never contributed to thrift project. Could you please point us to the documentation on how to submit to PR? Thanks > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16613371#comment-16613371 ] James E. King III commented on THRIFT-4499: --- Submitting a PR in github would be better; it would run the CI test suite. I see nothing wrong with this change. > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-4499) Remove Magic Number In TFIleTransport
[ https://issues.apache.org/jira/browse/THRIFT-4499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16612924#comment-16612924 ] Naveen Gangam commented on THRIFT-4499: --- @toddlipcon Would you be able to review this patch? Thanks > Remove Magic Number In TFIleTransport > - > > Key: THRIFT-4499 > URL: https://issues.apache.org/jira/browse/THRIFT-4499 > Project: Thrift > Issue Type: Improvement > Components: Java - Library >Affects Versions: 0.11.0 >Reporter: BELUGA BEHR >Priority: Trivial > Attachments: THRIFT-4499.1.patch > > > Here, the buffer is hard-coded to 8192 (which matches the default value on > most JDK implementations). You may wish to remove this magic number and let > the JDK decide the size. > https://github.com/apache/thrift/blob/19baeefd8c38d62085891d7956349601f79448b3/lib/java/src/org/apache/thrift/transport/TFileTransport.java#L369 -- This message was sent by Atlassian JIRA (v7.6.3#76005)