[jira] [Created] (THRIFT-3300) Reimplement TZlibTransport in Java using streams

2015-08-19 Thread Paul Magrath (JIRA)
Paul Magrath created THRIFT-3300:


 Summary: Reimplement TZlibTransport in Java using streams
 Key: THRIFT-3300
 URL: https://issues.apache.org/jira/browse/THRIFT-3300
 Project: Thrift
  Issue Type: Improvement
Reporter: Paul Magrath
Priority: Minor


The implementation of TZlibTransport in Java could be simplified by making use 
of the InflaterInputStream, DeflaterOutputStream and TIOStreamTransport 
classes. This also has the benefit of eliminating the need to allocate byte 
arrays for buffers. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (THRIFT-3300) Reimplement TZlibTransport in Java using streams

2015-08-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14703193#comment-14703193
 ] 

ASF GitHub Bot commented on THRIFT-3300:


GitHub user Magrath opened a pull request:

https://github.com/apache/thrift/pull/590

THRIFT-3300 Reimplement TZlibTransport in Java using streams

https://issues.apache.org/jira/browse/THRIFT-3300

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Magrath/thrift THRIFT-3300

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/590.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #590


commit c01aff7038adb9fa2098c02d0092757834fd4df4
Author: Paul Magrath p...@swiftkey.com
Date:   2015-08-17T17:25:24Z

THRIFT-3300 Reimplement TZlibTransport in Java using streams




 Reimplement TZlibTransport in Java using streams
 

 Key: THRIFT-3300
 URL: https://issues.apache.org/jira/browse/THRIFT-3300
 Project: Thrift
  Issue Type: Improvement
Reporter: Paul Magrath
Priority: Minor

 The implementation of TZlibTransport in Java could be simplified by making 
 use of the InflaterInputStream, DeflaterOutputStream and TIOStreamTransport 
 classes. This also has the benefit of eliminating the need to allocate byte 
 arrays for buffers. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] thrift pull request: THRIFT-3300 Reimplement TZlibTransport in Jav...

2015-08-19 Thread Magrath
GitHub user Magrath opened a pull request:

https://github.com/apache/thrift/pull/590

THRIFT-3300 Reimplement TZlibTransport in Java using streams

https://issues.apache.org/jira/browse/THRIFT-3300

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Magrath/thrift THRIFT-3300

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/590.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #590


commit c01aff7038adb9fa2098c02d0092757834fd4df4
Author: Paul Magrath p...@swiftkey.com
Date:   2015-08-17T17:25:24Z

THRIFT-3300 Reimplement TZlibTransport in Java using streams




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Created] (THRIFT-3299) Dart language bindings in Thrift

2015-08-19 Thread Mark Erickson (JIRA)
Mark Erickson created THRIFT-3299:
-

 Summary: Dart language bindings in Thrift
 Key: THRIFT-3299
 URL: https://issues.apache.org/jira/browse/THRIFT-3299
 Project: Thrift
  Issue Type: New Feature
Reporter: Mark Erickson


Add support for Dart (dartlang.org) language bindings in Thrift.

https://thrift.apache.org/docs/HowToNewLanguage



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (THRIFT-3297) c_glib: an abstract base class is not generated

2015-08-19 Thread Simon South (JIRA)

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

Simon South resolved THRIFT-3297.
-
   Resolution: Done
Fix Version/s: 0.9.2

Great. Please open another ticket if you run into any other issues.

 c_glib: an abstract base class is not generated
 ---

 Key: THRIFT-3297
 URL: https://issues.apache.org/jira/browse/THRIFT-3297
 Project: Thrift
  Issue Type: Bug
  Components: C glib - Compiler
Affects Versions: 0.9.1
Reporter: Pavel Paulau
Assignee: Simon South
 Fix For: 0.9.2


 The tutorial says:
 {quote}
 For each service the Thrift compiler generates an abstract base
class from which handler implementations should inherit. In our
case TutorialCalculatorHandler inherits from CalculatorHandler,
defined in gen-c_glib/calculator.h.
 {quote}
 However, when I run
 {code}
 thrift -r --gen c_glib tutorial.thrift
 {code}
 I get:
 {code}
 /**
  * Autogenerated by Thrift Compiler (0.9.1)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
 #ifndef CALCULATOR_H
 #define CALCULATOR_H
 #include tutorial_types.h
 #include shared_service.h
 /* Calculator service interface */
 typedef struct _CalculatorIf CalculatorIf;  /* dummy object */
 struct _CalculatorIfInterface
 {
   GTypeInterface parent;
   gboolean (*ping) (CalculatorIf *iface, GError **error);
   gboolean (*add) (CalculatorIf *iface, gint32* _return, const gint32 num1, 
 const gint32 num2, GError **error);
   gboolean (*calculate) (CalculatorIf *iface, gint32* _return, const gint32 
 logid, const Work * w, InvalidOperation ** ouch, GError **error);
   gboolean (*zip) (CalculatorIf *iface, GError **error);
 };
 typedef struct _CalculatorIfInterface CalculatorIfInterface;
 GType calculator_if_get_type (void);
 #define TYPE_CALCULATOR_IF (calculator_if_get_type())
 #define CALCULATOR_IF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
 TYPE_CALCULATOR_IF, CalculatorIf))
 #define IS_CALCULATOR_IF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
 TYPE_CALCULATOR_IF))
 #define CALCULATOR_IF_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE 
 ((inst), TYPE_CALCULATOR_IF, CalculatorIfInterface))
 gboolean calculator_if_ping (CalculatorIf *iface, GError **error);
 gboolean calculator_if_add (CalculatorIf *iface, gint32* _return, const 
 gint32 num1, const gint32 num2, GError **error);
 gboolean calculator_if_calculate (CalculatorIf *iface, gint32* _return, const 
 gint32 logid, const Work * w, InvalidOperation ** ouch, GError **error);
 gboolean calculator_if_zip (CalculatorIf *iface, GError **error);
 /* Calculator service client */
 struct _CalculatorClient
 {
   GObject parent;
   ThriftProtocol *input_protocol;
   ThriftProtocol *output_protocol;
 };
 typedef struct _CalculatorClient CalculatorClient;
 struct _CalculatorClientClass
 {
   GObjectClass parent;
 };
 typedef struct _CalculatorClientClass CalculatorClientClass;
 GType calculator_client_get_type (void);
 #define TYPE_CALCULATOR_CLIENT (calculator_client_get_type())
 #define CALCULATOR_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
 TYPE_CALCULATOR_CLIENT, CalculatorClient))
 #define CALCULATOR_CLIENT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), 
 TYPE_CALCULATOR_CLIENT, CalculatorClientClass))
 #define CALCULATOR_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
 TYPE_CALCULATOR_CLIENT))
 #define CALCULATOR_IS_CLIENT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), 
 TYPE_CALCULATOR_CLIENT))
 #define CALCULATOR_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), 
 TYPE_CALCULATOR_CLIENT, CalculatorClientClass))
 gboolean calculator_client_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_send_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_recv_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_add (CalculatorIf * iface, gint32* _return, const 
 gint32 num1, const gint32 num2, GError ** error);
 gboolean calculator_client_send_add (CalculatorIf * iface, const gint32 num1, 
 const gint32 num2, GError ** error);
 gboolean calculator_client_recv_add (CalculatorIf * iface, gint32* _return, 
 GError ** error);
 gboolean calculator_client_calculate (CalculatorIf * iface, gint32* _return, 
 const gint32 logid, const Work * w, InvalidOperation ** ouch, GError ** 
 error);
 gboolean calculator_client_send_calculate (CalculatorIf * iface, const gint32 
 logid, const Work * w, GError ** error);
 gboolean calculator_client_recv_calculate (CalculatorIf * iface, gint32* 
 _return, InvalidOperation ** ouch, GError ** error);
 gboolean calculator_client_zip (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_send_zip (CalculatorIf * iface, GError ** error);
 void calculator_client_set_property (GObject *object, guint property_id, 
 const 

[jira] [Commented] (THRIFT-3297) c_glib: an abstract base class is not generated

2015-08-19 Thread Pavel Paulau (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-3297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14703351#comment-14703351
 ] 

Pavel Paulau commented on THRIFT-3297:
--

Yep, using Thrift 0.9.2 solves the issue.

 c_glib: an abstract base class is not generated
 ---

 Key: THRIFT-3297
 URL: https://issues.apache.org/jira/browse/THRIFT-3297
 Project: Thrift
  Issue Type: Bug
  Components: C glib - Compiler
Affects Versions: 0.9.1
Reporter: Pavel Paulau
Assignee: Simon South

 The tutorial says:
 {quote}
 For each service the Thrift compiler generates an abstract base
class from which handler implementations should inherit. In our
case TutorialCalculatorHandler inherits from CalculatorHandler,
defined in gen-c_glib/calculator.h.
 {quote}
 However, when I run
 {code}
 thrift -r --gen c_glib tutorial.thrift
 {code}
 I get:
 {code}
 /**
  * Autogenerated by Thrift Compiler (0.9.1)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
 #ifndef CALCULATOR_H
 #define CALCULATOR_H
 #include tutorial_types.h
 #include shared_service.h
 /* Calculator service interface */
 typedef struct _CalculatorIf CalculatorIf;  /* dummy object */
 struct _CalculatorIfInterface
 {
   GTypeInterface parent;
   gboolean (*ping) (CalculatorIf *iface, GError **error);
   gboolean (*add) (CalculatorIf *iface, gint32* _return, const gint32 num1, 
 const gint32 num2, GError **error);
   gboolean (*calculate) (CalculatorIf *iface, gint32* _return, const gint32 
 logid, const Work * w, InvalidOperation ** ouch, GError **error);
   gboolean (*zip) (CalculatorIf *iface, GError **error);
 };
 typedef struct _CalculatorIfInterface CalculatorIfInterface;
 GType calculator_if_get_type (void);
 #define TYPE_CALCULATOR_IF (calculator_if_get_type())
 #define CALCULATOR_IF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
 TYPE_CALCULATOR_IF, CalculatorIf))
 #define IS_CALCULATOR_IF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
 TYPE_CALCULATOR_IF))
 #define CALCULATOR_IF_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE 
 ((inst), TYPE_CALCULATOR_IF, CalculatorIfInterface))
 gboolean calculator_if_ping (CalculatorIf *iface, GError **error);
 gboolean calculator_if_add (CalculatorIf *iface, gint32* _return, const 
 gint32 num1, const gint32 num2, GError **error);
 gboolean calculator_if_calculate (CalculatorIf *iface, gint32* _return, const 
 gint32 logid, const Work * w, InvalidOperation ** ouch, GError **error);
 gboolean calculator_if_zip (CalculatorIf *iface, GError **error);
 /* Calculator service client */
 struct _CalculatorClient
 {
   GObject parent;
   ThriftProtocol *input_protocol;
   ThriftProtocol *output_protocol;
 };
 typedef struct _CalculatorClient CalculatorClient;
 struct _CalculatorClientClass
 {
   GObjectClass parent;
 };
 typedef struct _CalculatorClientClass CalculatorClientClass;
 GType calculator_client_get_type (void);
 #define TYPE_CALCULATOR_CLIENT (calculator_client_get_type())
 #define CALCULATOR_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
 TYPE_CALCULATOR_CLIENT, CalculatorClient))
 #define CALCULATOR_CLIENT_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), 
 TYPE_CALCULATOR_CLIENT, CalculatorClientClass))
 #define CALCULATOR_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
 TYPE_CALCULATOR_CLIENT))
 #define CALCULATOR_IS_CLIENT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), 
 TYPE_CALCULATOR_CLIENT))
 #define CALCULATOR_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), 
 TYPE_CALCULATOR_CLIENT, CalculatorClientClass))
 gboolean calculator_client_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_send_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_recv_ping (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_add (CalculatorIf * iface, gint32* _return, const 
 gint32 num1, const gint32 num2, GError ** error);
 gboolean calculator_client_send_add (CalculatorIf * iface, const gint32 num1, 
 const gint32 num2, GError ** error);
 gboolean calculator_client_recv_add (CalculatorIf * iface, gint32* _return, 
 GError ** error);
 gboolean calculator_client_calculate (CalculatorIf * iface, gint32* _return, 
 const gint32 logid, const Work * w, InvalidOperation ** ouch, GError ** 
 error);
 gboolean calculator_client_send_calculate (CalculatorIf * iface, const gint32 
 logid, const Work * w, GError ** error);
 gboolean calculator_client_recv_calculate (CalculatorIf * iface, gint32* 
 _return, InvalidOperation ** ouch, GError ** error);
 gboolean calculator_client_zip (CalculatorIf * iface, GError ** error);
 gboolean calculator_client_send_zip (CalculatorIf * iface, GError ** error);
 void calculator_client_set_property (GObject *object, guint property_id, 
 const GValue *value, GParamSpec *pspec);
 void 

[jira] [Assigned] (THRIFT-3300) Reimplement TZlibTransport in Java using streams

2015-08-19 Thread Randy Abernethy (JIRA)

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

Randy Abernethy reassigned THRIFT-3300:
---

Assignee: Randy Abernethy

 Reimplement TZlibTransport in Java using streams
 

 Key: THRIFT-3300
 URL: https://issues.apache.org/jira/browse/THRIFT-3300
 Project: Thrift
  Issue Type: Improvement
Reporter: Paul Magrath
Assignee: Randy Abernethy
Priority: Minor

 The implementation of TZlibTransport in Java could be simplified by making 
 use of the InflaterInputStream, DeflaterOutputStream and TIOStreamTransport 
 classes. This also has the benefit of eliminating the need to allocate byte 
 arrays for buffers. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)