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

2012-10-03 Thread Andrew Cox (JIRA)

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

Andrew Cox commented on THRIFT-1708:


We also have these in C++ and Python and I'd like to bring those in next, but 
will wait to see how this change is received (what people want changed before 
commit, etc), so I can save time getting to the same approach in C++ and Python.

> 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: 0.9
>
> 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] [Updated] (THRIFT-1708) Add event handlers for processor events

2012-10-03 Thread Andrew Cox (JIRA)

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

Andrew Cox updated THRIFT-1708:
---

Attachment: thrift-1708-processor-event-handlers.patch

> 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: 0.9
>
> 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] [Created] (THRIFT-1708) Add event handlers for processor events

2012-10-03 Thread Andrew Cox (JIRA)
Andrew Cox created THRIFT-1708:
--

 Summary: 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: 0.9
 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-336) Compact Protocol in C#

2012-10-03 Thread Henrique Mendonca (JIRA)

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

Henrique Mendonca resolved THRIFT-336.
--

   Resolution: Implemented
Fix Version/s: 0.9

Committed without the commented out lines.


> Compact Protocol in C#
> --
>
> Key: THRIFT-336
> URL: https://issues.apache.org/jira/browse/THRIFT-336
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C# - Library
>Reporter: Michael Greene
>Assignee: Henrique Mendonca
>Priority: Minor
> Fix For: 0.9
>
> Attachments: TCompactProtocol.cs, THRIFT-336.patch
>
>


--
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


Build failed in Jenkins: Thrift-Debian-Packages #298

2012-10-03 Thread Apache Jenkins Server
See 

Changes:

[henrique] Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça

[henrique] Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça

--
[...truncated 1271 lines...]
copying src/transport/TSSLSocket.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/transport
copying src/transport/__init__.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/transport
creating build/lib.linux-x86_64-2.6-pydebug/thrift/server
copying src/server/TServer.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/server
copying src/server/TNonblockingServer.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/server
copying src/server/TProcessPoolServer.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/server
copying src/server/THttpServer.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/server
copying src/server/__init__.py -> 
build/lib.linux-x86_64-2.6-pydebug/thrift/server
running build_ext
building 'thrift.protocol.fastbinary' extension
creating build/temp.linux-x86_64-2.6-pydebug
creating build/temp.linux-x86_64-2.6-pydebug/src
creating build/temp.linux-x86_64-2.6-pydebug/src/protocol
gcc -pthread -fno-strict-aliasing -g -Wall -Wstrict-prototypes -g -O2 -fPIC 
-I/usr/include/python2.6_d -c src/protocol/fastbinary.c -o 
build/temp.linux-x86_64-2.6-pydebug/src/protocol/fastbinary.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions 
-g -O2 build/temp.linux-x86_64-2.6-pydebug/src/protocol/fastbinary.o -o 
build/lib.linux-x86_64-2.6-pydebug/thrift/protocol/fastbinary_d.so
[33976 refs]
# PHP
cd 

 && \
phpize && \
./configure && make
Configuring for:
PHP Api Version: 20090626
Zend Module Api No:  20090626
Zend Extension Api No:   220090626
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main 
-I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext 
-I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20090626
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to 
regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable the thrift_protocol extension... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3458764513820540925
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checki

[jira] [Commented] (THRIFT-336) Compact Protocol in C#

2012-10-03 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-336:
---

Integrated in Thrift #542 (See [https://builds.apache.org/job/Thrift/542/])
Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça (Revision 1393370)
Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça (Revision 1393368)

 Result = FAILURE

> Compact Protocol in C#
> --
>
> Key: THRIFT-336
> URL: https://issues.apache.org/jira/browse/THRIFT-336
> Project: Thrift
>  Issue Type: Sub-task
>  Components: C# - Library
>Reporter: Michael Greene
>Assignee: Henrique Mendonca
>Priority: Minor
> Attachments: TCompactProtocol.cs, THRIFT-336.patch
>
>


--
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


Build failed in Jenkins: Thrift #542

2012-10-03 Thread Apache Jenkins Server
See 

Changes:

[henrique] Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça

[henrique] Thrift-336: Compact Protocol in C#
Patch: Henrique Mendonça

--
[...truncated 1206 lines...]
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT OptionalRequiredTest_types.lo -MD -MP -MF 
.deps/OptionalRequiredTest_types.Tpo -c gen-cpp/OptionalRequiredTest_types.cpp 
-o OptionalRequiredTest_types.o >/dev/null 2>&1
mv -f .deps/OptionalRequiredTest_types.Tpo .deps/OptionalRequiredTest_types.Plo
../../../compiler/cpp/thrift --gen cpp:dense ../../../test/ThriftTest.thrift
/bin/bash ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
ThriftTest_types.lo -MD -MP -MF .deps/ThriftTest_types.Tpo -c -o 
ThriftTest_types.lo `test -f 'gen-cpp/ThriftTest_types.cpp' || echo 
'./'`gen-cpp/ThriftTest_types.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ThriftTest_types.lo -MD -MP -MF 
.deps/ThriftTest_types.Tpo -c gen-cpp/ThriftTest_types.cpp  -fPIC -DPIC -o 
.libs/ThriftTest_types.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ThriftTest_types.lo -MD -MP -MF 
.deps/ThriftTest_types.Tpo -c gen-cpp/ThriftTest_types.cpp -o 
ThriftTest_types.o >/dev/null 2>&1
mv -f .deps/ThriftTest_types.Tpo .deps/ThriftTest_types.Plo
/bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
ThriftTest_extras.lo -MD -MP -MF .deps/ThriftTest_extras.Tpo -c -o 
ThriftTest_extras.lo ThriftTest_extras.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ThriftTest_extras.lo -MD -MP -MF 
.deps/ThriftTest_extras.Tpo -c ThriftTest_extras.cpp  -fPIC -DPIC -o 
.libs/ThriftTest_extras.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ThriftTest_extras.lo -MD -MP -MF 
.deps/ThriftTest_extras.Tpo -c ThriftTest_extras.cpp -o ThriftTest_extras.o 
>/dev/null 2>&1
mv -f .deps/ThriftTest_extras.Tpo .deps/ThriftTest_extras.Plo
/bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
DebugProtoTest_extras.lo -MD -MP -MF .deps/DebugProtoTest_extras.Tpo -c -o 
DebugProtoTest_extras.lo DebugProtoTest_extras.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT DebugProtoTest_extras.lo -MD -MP -MF 
.deps/DebugProtoTest_extras.Tpo -c DebugProtoTest_extras.cpp  -fPIC -DPIC -o 
.libs/DebugProtoTest_extras.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT DebugProtoTest_extras.lo -MD -MP -MF 
.deps/DebugProtoTest_extras.Tpo -c DebugProtoTest_extras.cpp -o 
DebugProtoTest_extras.o >/dev/null 2>&1
mv -f .deps/DebugProtoTest_extras.Tpo .deps/DebugProtoTest_extras.Plo
/bin/bash ../../../libtool --tag=CXX   --mode=link g++ -Wall -g -O2 -L/usr/lib  
-o libtestgencpp.la  DebugProtoTest_types.lo OptionalRequiredTest_types.lo 
DebugProtoTest_types.lo ThriftTest_types.lo ThriftTest_extras.lo 
DebugProtoTest_extras.lo ../../../lib/cpp/libthrift.la -lssl -lcrypto -lrt 
-lpthread 
copying selected object files to avoid basename conflicts...
libtool: link: ln .libs/DebugProtoTest_types.o 
.libs/libtestgencpp.lax/lt1-DebugProtoTest_types.o || cp 
.libs/DebugProtoTest_types.o .libs/libtestgencpp.lax/lt1-DebugProtoTest_types.o
libtool: link: ar cru .libs/libtestgencpp.a .libs/DebugProtoTest_types.o 
.libs/OptionalRequiredTest_types.o 
.libs/libtestgencpp.lax/lt1-DebugProtoTest_types.o .libs/ThriftTest_types.o 
.libs/ThriftTest_extras.o .libs/DebugProtoTest_extras.o
libtool: link: ranlib .libs/libtestgencpp.a
libtool: link: rm -fr .libs/libtestgencpp.lax
libtool: link: ( cd ".libs" && rm -f "libtestgencpp.la" && ln -s 
"../libtestgencpp.la" "libtestgencpp.la" )
../../../compiler/cpp/thrift --gen cpp:templates,cob_style processor/proc.thrift
/bin/bash ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../.. -I../../../lib/cpp/src -I/usr/include  -Wall -g -O2 -MT 
ChildService.lo -MD -MP -MF .deps/ChildService.Tpo -c -o ChildService.lo `test 
-f 'gen-cpp/ChildService.cpp' || echo './'`gen-cpp/ChildService.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ChildService.lo -MD -MP -MF 
.deps/ChildService.Tpo -c gen-cpp/ChildService.cpp  -fPIC -DPIC -o 
.libs/ChildService.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lib/cpp/src 
-I/usr/include -Wall -g -O2 -MT ChildService.lo -MD -MP -MF 
.deps/ChildService.Tpo -