[jira] [Commented] (THRIFT-1708) Add event handlers for processor events

2013-07-26 Thread Jens Geyer (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721224#comment-13721224
 ] 

Jens Geyer commented on THRIFT-1708:


If I don't overlook anything, events are fired when there is something to 
process. 

We found occasionally the need for at least one additional event, which would 
be fired when the server is really ready to process incoming requests, or 
immediately before. From my feeling this would be a good improvement to this 
concept. 

Does that make sense?

> Add event handlers for processor events
> ---
>
> Key: THRIFT-1708
> URL: https://issues.apache.org/jira/browse/THRIFT-1708
> Project: Thrift
>  Issue Type: New Feature
>  Components: Java - Library
>Affects Versions: 0.9
> Environment: all
>Reporter: Andrew Cox
>Assignee: Andrew Cox
>Priority: Minor
> Fix For: 1.0
>
> Attachments: thrift-1708-processor-event-handlers.patch
>
>
> Integrates some code we've been using (here at facebook) to add event 
> handlers that can handle processor events with the server event handlers in 
> apache thrift.
> Processor events include: preRead (before reading arguments), postRead (after 
> reading arguments), preWrite (before writing results), postWrite (after 
> writing results), and processorError (when a non-IDL exception is thrown as a 
> result of an error handling the request). The processor handler is given the 
> method name and input and output protocol that will be used to process the 
> request, and can inspect arguments on postRead, and results on pre/postWrite 
> events.
> This change also enables event handlers for non-blocking servers.
> Some unit tests are included to exercise the new processor event handlers, 
> and demonstrate how they can connect with server event handlers.
> It also fixes a minor bug I found while testing, where FrameBuffers on 
> non-blocking servers could have been close()'d more than once.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (THRIFT-2083) Improve the go lib: buffered Transport, save memory allocation, handle concurrent request

2013-07-26 Thread Jens Geyer (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-2083.


Resolution: Fixed

Committed, thanks again!

> Improve the go lib: buffered Transport, save memory allocation, handle 
> concurrent request
> -
>
> Key: THRIFT-2083
> URL: https://issues.apache.org/jira/browse/THRIFT-2083
> Project: Thrift
>  Issue Type: Improvement
>  Components: Go - Library
>Affects Versions: 0.9.1
>Reporter: Feng Shen
> Fix For: 0.9.1
>
> Attachments: 0001-Improve-the-go-lib.patch, 
> 0002-Add-test-for-buffered_transport-Integrating-buffered.patch
>
>
> 1. Add Buffered Transport wrapper
> 2. Avoid allocating by using a small buffer for binary protocol
> 3. TSimpleServer handle concurrent request

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (THRIFT-2101) Go generator, unused imports causes compilation to fail

2013-07-26 Thread Khee Chin (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Khee Chin closed THRIFT-2101.
-

Resolution: Not A Problem

Issue has already been fixed in 
https://issues.apache.org/jira/browse/THRIFT-2090

> Go generator, unused imports causes compilation to fail
> ---
>
> Key: THRIFT-2101
> URL: https://issues.apache.org/jira/browse/THRIFT-2101
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Compiler
>Reporter: Khee Chin
> Attachments: types.patch
>
>
> After generating the go bindings for my idl file, on HEAD, compiling my go 
> module fails with the error
> {quote}
> ERROR 2013/07/25 12:29:12 build.go:79: # test123/src/myapp/app/pymarissa
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7: imported and not 
> used: "fmt"
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:8: imported and not 
> used: "git.apache.org/thrift.git/lib/go/thrift"
> Abort: Failed to build: Go Compilation Error (in 
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7): imported and not 
> used: "fmt"
> {quote}
> Since the imports are not used in ttypes.go, I've removed it (and the import 
> protection) for f_types in the compiler phase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (THRIFT-2101) Go generator, unused imports causes compilation to fail

2013-07-26 Thread Khee Chin (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720880#comment-13720880
 ] 

Khee Chin commented on THRIFT-2101:
---

I see. Thanks for the explanation.

> Go generator, unused imports causes compilation to fail
> ---
>
> Key: THRIFT-2101
> URL: https://issues.apache.org/jira/browse/THRIFT-2101
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Compiler
>Reporter: Khee Chin
> Attachments: types.patch
>
>
> After generating the go bindings for my idl file, on HEAD, compiling my go 
> module fails with the error
> {quote}
> ERROR 2013/07/25 12:29:12 build.go:79: # test123/src/myapp/app/pymarissa
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7: imported and not 
> used: "fmt"
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:8: imported and not 
> used: "git.apache.org/thrift.git/lib/go/thrift"
> Abort: Failed to build: Go Compilation Error (in 
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7): imported and not 
> used: "fmt"
> {quote}
> Since the imports are not used in ttypes.go, I've removed it (and the import 
> protection) for f_types in the compiler phase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (THRIFT-2101) Go generator, unused imports causes compilation to fail

2013-07-26 Thread Emir Habul (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720879#comment-13720879
 ] 

Emir Habul commented on THRIFT-2101:


> ttypes.go does not serve any purpose, is there any reason why it is generated?

Definition of types (structs for example) would live ttypes file. It is true 
that file gets generated even if you don't have any types. But that should not 
be a big concern.

> Go generator, unused imports causes compilation to fail
> ---
>
> Key: THRIFT-2101
> URL: https://issues.apache.org/jira/browse/THRIFT-2101
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Compiler
>Reporter: Khee Chin
> Attachments: types.patch
>
>
> After generating the go bindings for my idl file, on HEAD, compiling my go 
> module fails with the error
> {quote}
> ERROR 2013/07/25 12:29:12 build.go:79: # test123/src/myapp/app/pymarissa
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7: imported and not 
> used: "fmt"
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:8: imported and not 
> used: "git.apache.org/thrift.git/lib/go/thrift"
> Abort: Failed to build: Go Compilation Error (in 
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7): imported and not 
> used: "fmt"
> {quote}
> Since the imports are not used in ttypes.go, I've removed it (and the import 
> protection) for f_types in the compiler phase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (THRIFT-2101) Go generator, unused imports causes compilation to fail

2013-07-26 Thread Khee Chin (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720873#comment-13720873
 ] 

Khee Chin commented on THRIFT-2101:
---

My bad, when I tried to create a test-case for this issue, I did a git-pull and 
verified the issue no longer exist with HEAD. It seems my previous thrift was 
at a slightly older commit, 4f7ad2d98b22b367c7a4a25991cdf9a81647d3be.

Using git-bisect, it seems the fix was commited in 
a7da48805c9fdcc4ad507272abd997ed1961d296 (Thu Jul 18 00:33:05 2013 +0200 by 
Jens Geyer), written by you.

The thrift compiler now generates the safety variables in ttypes.go . However, 
it seems to me that ttypes.go does not serve any purpose, is there any reason 
why it is generated?

This issue can be closed.


> Go generator, unused imports causes compilation to fail
> ---
>
> Key: THRIFT-2101
> URL: https://issues.apache.org/jira/browse/THRIFT-2101
> Project: Thrift
>  Issue Type: Bug
>  Components: Go - Compiler
>Reporter: Khee Chin
> Attachments: types.patch
>
>
> After generating the go bindings for my idl file, on HEAD, compiling my go 
> module fails with the error
> {quote}
> ERROR 2013/07/25 12:29:12 build.go:79: # test123/src/myapp/app/pymarissa
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7: imported and not 
> used: "fmt"
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:8: imported and not 
> used: "git.apache.org/thrift.git/lib/go/thrift"
> Abort: Failed to build: Go Compilation Error (in 
> gocode/src/test123/src/myapp/app/pymarissa/ttypes.go:7): imported and not 
> used: "fmt"
> {quote}
> Since the imports are not used in ttypes.go, I've removed it (and the import 
> protection) for f_types in the compiler phase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira