[GitHub] thrift pull request: THRIFT-2877 Generate hashCode using primitive...

2015-04-26 Thread roshan
GitHub user roshan reopened a pull request:

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

THRIFT-2877 Generate hashCode using primitives, static utility methods

This is pretty much the List.hashCode() except without any list. It takes 
about a third the time on some rudimentary benchmarks. I tried it out with

```
typedef i32 SomeId
typedef binary BinId
typedef string StringId

struct NonTrue {}

union MaybeAThing {
1: NonTrue nt
2: bool bl
}

enum Nomnom {
EAT=31
LIVE=515
}

struct AllPrims {
1: bool boole
2: byte single_byte
3: i16 shrt
4: i32 integ
5: i64 longue
6: double f64
7: string str
8: binary bin
9: Nomnom en
10: NonTrue stru
11: MaybeAThing un
12: SomeId intid
13: BinId binid
14: StringId strid
}
```

generating [this 
hashCode()](https://gist.github.com/roshan/7b7fff349e3ed06322c3).

Populating these structs with some values has it match the 
AbstractList.hashCode() result but maybe we could try a different 
multiplicative factor.

Sorry about the other one https://github.com/apache/thrift/pull/447. I 
rebased to one commit, but couldn't seem to reuse the old PR (it compiled 
locally on gcc but failed on clang).

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

$ git pull https://github.com/roshan/thrift THRIFT-2877_int_based_hashcode

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

https://github.com/apache/thrift/pull/448.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 #448


commit b436a7ef56f5e6744d1004b284efa7b1d64b375b
Author: Roshan George ros...@arjie.com
Date:   2015-04-17T07:46:02Z

THRIFT-2877 Generate hashCode using primitives and static utility methods




---
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] [Commented] (THRIFT-2877) Optimize generated hashCode

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2877:


GitHub user roshan reopened a pull request:

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

THRIFT-2877 Generate hashCode using primitives, static utility methods

This is pretty much the List.hashCode() except without any list. It takes 
about a third the time on some rudimentary benchmarks. I tried it out with

```
typedef i32 SomeId
typedef binary BinId
typedef string StringId

struct NonTrue {}

union MaybeAThing {
1: NonTrue nt
2: bool bl
}

enum Nomnom {
EAT=31
LIVE=515
}

struct AllPrims {
1: bool boole
2: byte single_byte
3: i16 shrt
4: i32 integ
5: i64 longue
6: double f64
7: string str
8: binary bin
9: Nomnom en
10: NonTrue stru
11: MaybeAThing un
12: SomeId intid
13: BinId binid
14: StringId strid
}
```

generating [this 
hashCode()](https://gist.github.com/roshan/7b7fff349e3ed06322c3).

Populating these structs with some values has it match the 
AbstractList.hashCode() result but maybe we could try a different 
multiplicative factor.

Sorry about the other one https://github.com/apache/thrift/pull/447. I 
rebased to one commit, but couldn't seem to reuse the old PR (it compiled 
locally on gcc but failed on clang).

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

$ git pull https://github.com/roshan/thrift THRIFT-2877_int_based_hashcode

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

https://github.com/apache/thrift/pull/448.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 #448


commit b436a7ef56f5e6744d1004b284efa7b1d64b375b
Author: Roshan George ros...@arjie.com
Date:   2015-04-17T07:46:02Z

THRIFT-2877 Generate hashCode using primitives and static utility methods




 Optimize generated hashCode
 ---

 Key: THRIFT-2877
 URL: https://issues.apache.org/jira/browse/THRIFT-2877
 Project: Thrift
  Issue Type: Improvement
  Components: Java - Compiler
Affects Versions: 0.9.3
Reporter: Mike Rettig
Priority: Critical

 The generated java hashCode method allocates an ArrayList then appends the 
 fields to the list.  Primitive fields will be boxed when added to the list. 
 The generated code shouldn't allocate a list or box primitives.  The hashCode 
 can be calculated by using a primitive int and some static utility methods 
 which can return the hashCode for each type.
  out  indent()  @Override  endl  indent()  public int hashCode() 
 {  endl;
 1839   indent_up();
 1840   indent(out)  ListObject list = new ArrayListObject();  endl;
 1841 
 1842   for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
 1843 out  endl;
 1844 
 1845 t_type* t = get_true_type((*m_iter)-get_type());
 1846 bool is_optional = (*m_iter)-get_req() == t_field::T_OPTIONAL;
 1847 bool can_be_null = type_can_be_null(t);
 1848 string name = (*m_iter)-get_name();
 1849 
 1850 string present = true;
 1851 
 1852 if (is_optional || can_be_null) {
 1853   present +=   ( + generate_isset_check(*m_iter) + );
 1854 }
 1855 
 1856 indent(out)  boolean present_  name   =   present  ; 
  endl;
 1857 indent(out)  list.add(present_  name  );  endl;
 1858 indent(out)  if (present_  name  )  endl;
 1859 if (t-is_enum()) {
 1860   indent(out)list.add(  name  .getValue());  endl;
 1861 } else {
 1862   indent(out)list.add(  name  );  endl;
 1863 }
 1864   }
 1865 
 1866   out  endl;
 1867   indent(out)  return list.hashCode();  endl;
 1868   indent_down();
 1869   indent(out)  }  endl  endl;
 1870 }



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


[jira] [Resolved] (THRIFT-3067) C++ cppcheck performance related warnings

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-3067.
-
   Resolution: Fixed
Fix Version/s: 0.9.3

committed

 C++ cppcheck performance related warnings
 -

 Key: THRIFT-3067
 URL: https://issues.apache.org/jira/browse/THRIFT-3067
 Project: Thrift
  Issue Type: Bug
  Components: C++ - Library
Affects Versions: 0.9.2
Reporter: James E. King, III
Priority: Trivial
 Fix For: 0.9.3


 These are performance-related issues identified by cppcheck that could be 
 cleaned up.  Since these are not logic errors per se, I have marked them as 
 trivial:
 {noformat}grep 'performance' /tmp/cppcheck-thrift.issues
 [compiler/cpp/src/parse/t_enum.h:47]: (performance) Function parameter 'name' 
 should be passed by reference.
 [compiler/cpp/src/parse/t_program.h:72]: (performance) Variable 'name_' is 
 assigned in constructor body. Consider performing initialization in 
 initialization list.
 [compiler/cpp/src/parse/t_service.h:48]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [contrib/fb303/TClientInfo.cpp:157] - [contrib/fb303/TClientInfo.cpp:159]: 
 (performance) Variable 'secs' is reassigned a value before the old one has 
 been used.
 [contrib/fb303/cpp/FacebookBase.cpp:101]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [contrib/fb303/cpp/ServiceTracker.cpp:254]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:354]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:448]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/TimerManager.cpp:122]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.{noformat}
 I also noticed that the TSocket constructor that takes a string argument does 
 so by value instead of by reference.



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


[GitHub] thrift pull request: THRIFT-3109 Cross test log file cannot be bro...

2015-04-26 Thread bufferoverflow
Github user bufferoverflow commented on the pull request:

https://github.com/apache/thrift/pull/457#issuecomment-96396299
  
committed, you can close this


---
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] [Commented] (THRIFT-3109) Cross test log file cannot be browsed when served in HTTP server

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3109:


Github user bufferoverflow commented on the pull request:

https://github.com/apache/thrift/pull/457#issuecomment-96396299
  
committed, you can close this


 Cross test log file cannot be browsed when served in HTTP server
 

 Key: THRIFT-3109
 URL: https://issues.apache.org/jira/browse/THRIFT-3109
 Project: Thrift
  Issue Type: Bug
  Components: Test Suite
 Environment: Chrome
 Firefox
Reporter: Nobuaki Sukegawa
Assignee: Nobuaki Sukegawa
Priority: Minor
 Fix For: 0.9.3


 Links to log files in cross test {{result.html}} does not work when served in 
 HTTP server.
 It is especially crucial for Chrome because alternative way (use of 
 {{file://}} scheme) does not work on it.
 h4. Steps to reproduce:
 # Run any number of cross test if never run once on your environment
 # As test output suggests, run HTTP server on the test directory, like {{cd 
 test  python -m SimpleHTTPServer 8001}} for python2
 # Browse http://localhost:8001/result.html using a browser
 # Click on any *server* or *client* link in *Result(log)* column
 h4. Expected result:
 The log file content is displayed or at least a download dialog pops up.
 h4. Actual result:
 404 Not found.
 h4. Cause:
 Link path format in {{results.json}} file should be relative rather than 
 absolute file paths.



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


[GitHub] thrift pull request: Thrift-3067

2015-04-26 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] thrift pull request: THRIFT-3117 Java TSSLTransportFactory can't l...

2015-04-26 Thread Smyatkin-Maxim
GitHub user Smyatkin-Maxim opened a pull request:

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

THRIFT-3117 Java TSSLTransportFactory can't load certificates within JAR...

Added getStoreAsStream function to look for certificates in filesystem 
paths, URLs or classpath resources just like it is done in ActiveMQ.

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

$ git pull https://github.com/Smyatkin-Maxim/thrift THRIFT-3117

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

https://github.com/apache/thrift/pull/465.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 #465


commit aa6d693b21ccc855921a23f507fbb367b91da2c4
Author: Smyatkin Maxim smyatkinma...@gmail.com
Date:   2015-04-26T15:07:26Z

THRIFT-3117 Java TSSLTransportFactory can't load certificates within JAR 
archive




---
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] [Commented] (THRIFT-3117) Java TSSLTransportFactory can't load certificates within JAR archive

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3117:


GitHub user Smyatkin-Maxim opened a pull request:

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

THRIFT-3117 Java TSSLTransportFactory can't load certificates within JAR...

Added getStoreAsStream function to look for certificates in filesystem 
paths, URLs or classpath resources just like it is done in ActiveMQ.

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

$ git pull https://github.com/Smyatkin-Maxim/thrift THRIFT-3117

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

https://github.com/apache/thrift/pull/465.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 #465


commit aa6d693b21ccc855921a23f507fbb367b91da2c4
Author: Smyatkin Maxim smyatkinma...@gmail.com
Date:   2015-04-26T15:07:26Z

THRIFT-3117 Java TSSLTransportFactory can't load certificates within JAR 
archive




 Java TSSLTransportFactory can't load certificates within JAR archive
 

 Key: THRIFT-3117
 URL: https://issues.apache.org/jira/browse/THRIFT-3117
 Project: Thrift
  Issue Type: Bug
  Components: Java - Library
Affects Versions: 0.9.2
Reporter: Smyatkin Maxim
Priority: Trivial
 Fix For: 0.9.2

   Original Estimate: 2h
  Remaining Estimate: 2h

 TSSLTransportFactory's setKeyStore/setTrustStore accept only plain file 
 system paths what makes it impossible to use URL's or classpath based 
 resources. E.g., I didn't find a way to load certificate from JAR.
 I propose to look for both URLs and resources if the file can not be found by 
 the given path. It's how it is done in ActiveMQ:
 https://access.redhat.com/documentation/en-US/Fuse_ESB/4.4.1/html/ActiveMQ_Security_Guide/files/SSL-SecureJavaClients.html
 https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java#L175-L206



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


[GitHub] thrift pull request: Thrift 3114 Using local temp variables to not...

2015-04-26 Thread asfgit
Github user asfgit closed the pull request at:

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


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


[GitHub] thrift pull request: Support negative hex literals in IDL

2015-04-26 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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] [Commented] (THRIFT-3115) Uncompileable code due to name collision with predefined used types

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3115:


SUCCESS: Integrated in Thrift #1520 (See 
[https://builds.apache.org/job/Thrift/1520/])
THRIFT-3115 Uncompileable code due to name collision with predefined used types 
(jensg: rev 958a7a242a59bc2d3965399483fbbb0dbeafa0e8)
* compiler/cpp/src/generate/t_delphi_generator.cc


 Uncompileable code due to name collision with predefined used types
 ---

 Key: THRIFT-3115
 URL: https://issues.apache.org/jira/browse/THRIFT-3115
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer
 Fix For: 0.9.3

 Attachments: 
 THRIFT-3115-Uncompileable-code-due-to-name-collision.patch, _Thrift3115.thrift


 Some type names produce code that cannot be compiled:
 {code}
 typedef binary Bytes
 {code}
 For delphi, the following code is generated, referencing {{TBytes}} 
 predefined type used to represent {{binary}} Thrift fields:
 {code}
 type TBytes = TBytes
 {code}
 which is illegal.



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


[jira] [Commented] (THRIFT-3114) Using local temp variables to not pollute the global table

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3114:


SUCCESS: Integrated in Thrift #1520 (See 
[https://builds.apache.org/job/Thrift/1520/])
THRIFT-3114 Using local temp variables to not pollute the global table (jensg: 
rev 811d279d581c7daffcee846492f5efca12fda3db)
* compiler/cpp/src/generate/t_lua_generator.cc


 Using local temp variables to not pollute the global table
 --

 Key: THRIFT-3114
 URL: https://issues.apache.org/jira/browse/THRIFT-3114
 Project: Thrift
  Issue Type: Improvement
  Components: Lua - Compiler
Affects Versions: 1.0
 Environment: Mac OS X 10.9.5, Lua 5.2
Reporter: Xin Li
Assignee: Jens Geyer
 Fix For: 0.9.3


 Should prefix the field deserialization statements with local whenever the 
 output is a temporary variable, for example this compiler output:
 _elem46 = iprot:readI32()
 should be changed to:
 local _elem46 = iprot:readI32().



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


[jira] [Resolved] (THRIFT-3109) Cross test log file cannot be browsed when served in HTTP server

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-3109.
-
Resolution: Fixed
  Assignee: Nobuaki Sukegawa

committed

 Cross test log file cannot be browsed when served in HTTP server
 

 Key: THRIFT-3109
 URL: https://issues.apache.org/jira/browse/THRIFT-3109
 Project: Thrift
  Issue Type: Bug
  Components: Test Suite
 Environment: Chrome
 Firefox
Reporter: Nobuaki Sukegawa
Assignee: Nobuaki Sukegawa
Priority: Minor
 Fix For: 0.9.3


 Links to log files in cross test {{result.html}} does not work when served in 
 HTTP server.
 It is especially crucial for Chrome because alternative way (use of 
 {{file://}} scheme) does not work on it.
 h4. Steps to reproduce:
 # Run any number of cross test if never run once on your environment
 # As test output suggests, run HTTP server on the test directory, like {{cd 
 test  python -m SimpleHTTPServer 8001}} for python2
 # Browse http://localhost:8001/result.html using a browser
 # Click on any *server* or *client* link in *Result(log)* column
 h4. Expected result:
 The log file content is displayed or at least a download dialog pops up.
 h4. Actual result:
 404 Not found.
 h4. Cause:
 Link path format in {{results.json}} file should be relative rather than 
 absolute file paths.



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


[jira] [Resolved] (THRIFT-3116) Ambiguous exports in Haskell-generated code

2015-04-26 Thread Andreas Voellmy (JIRA)

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

Andreas Voellmy resolved THRIFT-3116.
-
Resolution: Fixed

Was fixed in 0.9.2.

 Ambiguous exports in Haskell-generated code
 ---

 Key: THRIFT-3116
 URL: https://issues.apache.org/jira/browse/THRIFT-3116
 Project: Thrift
  Issue Type: Bug
  Components: Haskell - Compiler
Affects Versions: 0.9.1
 Environment: Ubuntu 14.04
Reporter: Andreas Voellmy
 Fix For: 0.9.2


 It looks like the Thrift-generated Haskell exports functions in a way that 
 causes problems. For example, when I use thrift on the tutorial example, and 
 then I start up ghci and do 
 Prelude :l Calculator_Client.hs 
 [1 of 8] Compiling Shared_Types ( Shared_Types.hs, interpreted )
 [2 of 8] Compiling Tutorial_Types   ( Tutorial_Types.hs, interpreted )
 [3 of 8] Compiling SharedService_Iface ( SharedService_Iface.hs, interpreted )
 [4 of 8] Compiling SharedService( SharedService.hs, interpreted )
 [5 of 8] Compiling Calculator_Iface ( Calculator_Iface.hs, interpreted )
 [6 of 8] Compiling Calculator   ( Calculator.hs, interpreted )
 [7 of 8] Compiling SharedService_Client ( SharedService_Client.hs, 
 interpreted )
 [8 of 8] Compiling Calculator_Client ( Calculator_Client.hs, interpreted )
 Calculator_Client.hs:15:45:
 Ambiguous occurrence ‘zip’
 It could refer to either ‘Calculator_Client.zip’,
  defined at Calculator_Client.hs:112:1
   or ‘Data.ByteString.Lazy.zip’,
  imported from ‘Data.ByteString.Lazy’ at 
 Calculator_Client.hs:24:1-27
 Failed, modules loaded: SharedService_Client, Shared_Types, Tutorial_Types, 
 Calculator, SharedService, Calculator_Iface, SharedService_Iface.
 The problem is that zip (from the service definition) is also exported by 
 Data.ByteString.Lazy. One solution to this is to import all modules using 
 qualified imports.



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


[jira] [Updated] (THRIFT-3116) Ambiguous exports in Haskell-generated code

2015-04-26 Thread Andreas Voellmy (JIRA)

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

Andreas Voellmy updated THRIFT-3116:

Fix Version/s: 0.9.2

This appears to have been fixed in 0.9.2.

 Ambiguous exports in Haskell-generated code
 ---

 Key: THRIFT-3116
 URL: https://issues.apache.org/jira/browse/THRIFT-3116
 Project: Thrift
  Issue Type: Bug
  Components: Haskell - Compiler
Affects Versions: 0.9.1
 Environment: Ubuntu 14.04
Reporter: Andreas Voellmy
 Fix For: 0.9.2


 It looks like the Thrift-generated Haskell exports functions in a way that 
 causes problems. For example, when I use thrift on the tutorial example, and 
 then I start up ghci and do 
 Prelude :l Calculator_Client.hs 
 [1 of 8] Compiling Shared_Types ( Shared_Types.hs, interpreted )
 [2 of 8] Compiling Tutorial_Types   ( Tutorial_Types.hs, interpreted )
 [3 of 8] Compiling SharedService_Iface ( SharedService_Iface.hs, interpreted )
 [4 of 8] Compiling SharedService( SharedService.hs, interpreted )
 [5 of 8] Compiling Calculator_Iface ( Calculator_Iface.hs, interpreted )
 [6 of 8] Compiling Calculator   ( Calculator.hs, interpreted )
 [7 of 8] Compiling SharedService_Client ( SharedService_Client.hs, 
 interpreted )
 [8 of 8] Compiling Calculator_Client ( Calculator_Client.hs, interpreted )
 Calculator_Client.hs:15:45:
 Ambiguous occurrence ‘zip’
 It could refer to either ‘Calculator_Client.zip’,
  defined at Calculator_Client.hs:112:1
   or ‘Data.ByteString.Lazy.zip’,
  imported from ‘Data.ByteString.Lazy’ at 
 Calculator_Client.hs:24:1-27
 Failed, modules loaded: SharedService_Client, Shared_Types, Tutorial_Types, 
 Calculator, SharedService, Calculator_Iface, SharedService_Iface.
 The problem is that zip (from the service definition) is also exported by 
 Data.ByteString.Lazy. One solution to this is to import all modules using 
 qualified imports.



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


[GitHub] thrift pull request: Thrift 3113 c++11 check issue

2015-04-26 Thread RomainNaour
Github user RomainNaour commented on the pull request:

https://github.com/apache/thrift/pull/462#issuecomment-96394161
  
Thanks !


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


[GitHub] thrift pull request: Thrift 3113 c++11 check issue

2015-04-26 Thread RomainNaour
Github user RomainNaour closed the pull request at:

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


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


[GitHub] thrift pull request: Thrift 3103

2015-04-26 Thread bufferoverflow
Github user bufferoverflow commented on the pull request:

https://github.com/apache/thrift/pull/449#issuecomment-96396686
  
@marco-m this is committed, could you please close the PR


---
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] [Updated] (THRIFT-3115) Uncompileable code due to name collision with predefined used types

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer updated THRIFT-3115:
---
Attachment: _Thrift3115.thrift

[Testcase|^_Thrift3115.thrift]


 Uncompileable code due to name collision with predefined used types
 ---

 Key: THRIFT-3115
 URL: https://issues.apache.org/jira/browse/THRIFT-3115
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer
 Attachments: _Thrift3115.thrift


 Some type names produce code that cannot be compiled:
 {code}
 typedef binary Bytes
 {code}
 For delphi, the following code is generated, referencing {{TBytes}} 
 predefined type used to represent {{binary}} Thrift fields:
 {code}
 type TBytes = TBytes
 {code}
 which is illegal.



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


[jira] [Resolved] (THRIFT-3113) m4 C++11 macro issue

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-3113.
-
   Resolution: Fixed
Fix Version/s: 0.9.3

committed

 m4 C++11 macro issue
 

 Key: THRIFT-3113
 URL: https://issues.apache.org/jira/browse/THRIFT-3113
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.9.2
 Environment: Buildroot build system, crosscompilation, C++11
Reporter: Naour Romain
  Labels: build, patch
 Fix For: 0.9.3


 The ax_cxx_compile_stdcxx_11 macro bundled in thrift package is broken  [1] 
 and out of date. Since Thrift actually doesn't use that particular C++11 
 feature, make C++11 support optional.
 [1] https://savannah.gnu.org/patch/index.php?8287



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


[jira] [Created] (THRIFT-3116) Ambiguous exports in Haskell-generated code

2015-04-26 Thread Andreas Voellmy (JIRA)
Andreas Voellmy created THRIFT-3116:
---

 Summary: Ambiguous exports in Haskell-generated code
 Key: THRIFT-3116
 URL: https://issues.apache.org/jira/browse/THRIFT-3116
 Project: Thrift
  Issue Type: Bug
  Components: Haskell - Compiler
Affects Versions: 0.9.1
 Environment: Ubuntu 14.04
Reporter: Andreas Voellmy


It looks like the Thrift-generated Haskell exports functions in a way that 
causes problems. For example, when I use thrift on the tutorial example, and 
then I start up ghci and do 

Prelude :l Calculator_Client.hs 
[1 of 8] Compiling Shared_Types ( Shared_Types.hs, interpreted )
[2 of 8] Compiling Tutorial_Types   ( Tutorial_Types.hs, interpreted )
[3 of 8] Compiling SharedService_Iface ( SharedService_Iface.hs, interpreted )
[4 of 8] Compiling SharedService( SharedService.hs, interpreted )
[5 of 8] Compiling Calculator_Iface ( Calculator_Iface.hs, interpreted )
[6 of 8] Compiling Calculator   ( Calculator.hs, interpreted )
[7 of 8] Compiling SharedService_Client ( SharedService_Client.hs, interpreted )
[8 of 8] Compiling Calculator_Client ( Calculator_Client.hs, interpreted )

Calculator_Client.hs:15:45:
Ambiguous occurrence ‘zip’
It could refer to either ‘Calculator_Client.zip’,
 defined at Calculator_Client.hs:112:1
  or ‘Data.ByteString.Lazy.zip’,
 imported from ‘Data.ByteString.Lazy’ at 
Calculator_Client.hs:24:1-27
Failed, modules loaded: SharedService_Client, Shared_Types, Tutorial_Types, 
Calculator, SharedService, Calculator_Iface, SharedService_Iface.


The problem is that zip (from the service definition) is also exported by 
Data.ByteString.Lazy. One solution to this is to import all modules using 
qualified imports.



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


[jira] [Created] (THRIFT-3117) Java TSSLTransportFactory can't load certificates within JAR archive

2015-04-26 Thread Smyatkin Maxim (JIRA)
Smyatkin Maxim created THRIFT-3117:
--

 Summary: Java TSSLTransportFactory can't load certificates within 
JAR archive
 Key: THRIFT-3117
 URL: https://issues.apache.org/jira/browse/THRIFT-3117
 Project: Thrift
  Issue Type: Bug
  Components: Java - Library
Affects Versions: 0.9.2
Reporter: Smyatkin Maxim
Priority: Trivial
 Fix For: 0.9.2


TSSLTransportFactory's setKeyStore/setTrustStore accept only plain file system 
paths what makes it impossible to use URL's or classpath based resources. E.g., 
I didn't find a way to load certificate from JAR.

I propose to look for both URLs and resources if the file can not be found by 
the given path. It's how it is done in ActiveMQ:

https://access.redhat.com/documentation/en-US/Fuse_ESB/4.4.1/html/ActiveMQ_Security_Guide/files/SSL-SecureJavaClients.html

https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java#L175-L206



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


[GitHub] thrift pull request: THRIFT-3110 Print error log after cross test ...

2015-04-26 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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] [Commented] (THRIFT-3110) Print error log after cross test failures on Travis

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3110:


Github user asfgit closed the pull request at:

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


  Print error log after cross test failures on Travis
 

 Key: THRIFT-3110
 URL: https://issues.apache.org/jira/browse/THRIFT-3110
 Project: Thrift
  Issue Type: Improvement
  Components: Test Suite
Reporter: Nobuaki Sukegawa
Priority: Minor

 Currently, there's no way (that I know of) to retrieve cross test error log 
 from Travis-CI when the test failed.
 The patch adds {{after_failure}} entry to allow printing 
 {{nexpected_failure.log}} content to Travis-CI web UI when failed.



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


[jira] [Resolved] (THRIFT-3110) Print error log after cross test failures on Travis

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-3110.
-
Resolution: Fixed

committed

  Print error log after cross test failures on Travis
 

 Key: THRIFT-3110
 URL: https://issues.apache.org/jira/browse/THRIFT-3110
 Project: Thrift
  Issue Type: Improvement
  Components: Test Suite
Reporter: Nobuaki Sukegawa
Priority: Minor

 Currently, there's no way (that I know of) to retrieve cross test error log 
 from Travis-CI when the test failed.
 The patch adds {{after_failure}} entry to allow printing 
 {{nexpected_failure.log}} content to Travis-CI web UI when failed.



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


[jira] [Resolved] (THRIFT-3115) Uncompileable code due to name collision with predefined used types

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer resolved THRIFT-3115.

   Resolution: Fixed
Fix Version/s: 0.9.3

Committed.

 Uncompileable code due to name collision with predefined used types
 ---

 Key: THRIFT-3115
 URL: https://issues.apache.org/jira/browse/THRIFT-3115
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer
 Fix For: 0.9.3

 Attachments: 
 THRIFT-3115-Uncompileable-code-due-to-name-collision.patch, _Thrift3115.thrift


 Some type names produce code that cannot be compiled:
 {code}
 typedef binary Bytes
 {code}
 For delphi, the following code is generated, referencing {{TBytes}} 
 predefined type used to represent {{binary}} Thrift fields:
 {code}
 type TBytes = TBytes
 {code}
 which is illegal.



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


[jira] [Updated] (THRIFT-3115) Uncompileable code due to name collision with predefined used types

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer updated THRIFT-3115:
---
Attachment: THRIFT-3115-Uncompileable-code-due-to-name-collision.patch

 Uncompileable code due to name collision with predefined used types
 ---

 Key: THRIFT-3115
 URL: https://issues.apache.org/jira/browse/THRIFT-3115
 Project: Thrift
  Issue Type: Bug
  Components: Delphi - Compiler
Reporter: Jens Geyer
Assignee: Jens Geyer
 Fix For: 0.9.3

 Attachments: 
 THRIFT-3115-Uncompileable-code-due-to-name-collision.patch, _Thrift3115.thrift


 Some type names produce code that cannot be compiled:
 {code}
 typedef binary Bytes
 {code}
 For delphi, the following code is generated, referencing {{TBytes}} 
 predefined type used to represent {{binary}} Thrift fields:
 {code}
 type TBytes = TBytes
 {code}
 which is illegal.



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


[jira] [Closed] (THRIFT-3116) Ambiguous exports in Haskell-generated code

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer closed THRIFT-3116.
--

 Ambiguous exports in Haskell-generated code
 ---

 Key: THRIFT-3116
 URL: https://issues.apache.org/jira/browse/THRIFT-3116
 Project: Thrift
  Issue Type: Bug
  Components: Haskell - Compiler
Affects Versions: 0.9.1
 Environment: Ubuntu 14.04
Reporter: Andreas Voellmy
 Fix For: 0.9.2


 It looks like the Thrift-generated Haskell exports functions in a way that 
 causes problems. For example, when I use thrift on the tutorial example, and 
 then I start up ghci and do 
 Prelude :l Calculator_Client.hs 
 [1 of 8] Compiling Shared_Types ( Shared_Types.hs, interpreted )
 [2 of 8] Compiling Tutorial_Types   ( Tutorial_Types.hs, interpreted )
 [3 of 8] Compiling SharedService_Iface ( SharedService_Iface.hs, interpreted )
 [4 of 8] Compiling SharedService( SharedService.hs, interpreted )
 [5 of 8] Compiling Calculator_Iface ( Calculator_Iface.hs, interpreted )
 [6 of 8] Compiling Calculator   ( Calculator.hs, interpreted )
 [7 of 8] Compiling SharedService_Client ( SharedService_Client.hs, 
 interpreted )
 [8 of 8] Compiling Calculator_Client ( Calculator_Client.hs, interpreted )
 Calculator_Client.hs:15:45:
 Ambiguous occurrence ‘zip’
 It could refer to either ‘Calculator_Client.zip’,
  defined at Calculator_Client.hs:112:1
   or ‘Data.ByteString.Lazy.zip’,
  imported from ‘Data.ByteString.Lazy’ at 
 Calculator_Client.hs:24:1-27
 Failed, modules loaded: SharedService_Client, Shared_Types, Tutorial_Types, 
 Calculator, SharedService, Calculator_Iface, SharedService_Iface.
 The problem is that zip (from the service definition) is also exported by 
 Data.ByteString.Lazy. One solution to this is to import all modules using 
 qualified imports.



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


[GitHub] thrift pull request: Thrift 3113 c++11 check issue

2015-04-26 Thread bufferoverflow
Github user bufferoverflow commented on the pull request:

https://github.com/apache/thrift/pull/462#issuecomment-96393589
  
committed, please close the issue


---
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] [Commented] (THRIFT-3067) C++ cppcheck performance related warnings

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3067:


SUCCESS: Integrated in Thrift #1519 (See 
[https://builds.apache.org/job/Thrift/1519/])
THRIFT-3067 C++ cppcheck performance related warnings (roger: rev 
71f2d8a7140329f0f2fc339d84e50d9b27bf478c)
* contrib/fb303/cpp/FacebookBase.cpp
* contrib/fb303/TClientInfo.cpp
* compiler/cpp/src/parse/t_service.h
* .travis.yml
* lib/cpp/src/thrift/concurrency/ThreadManager.cpp
* lib/cpp/src/thrift/concurrency/TimerManager.cpp
* contrib/fb303/cpp/ServiceTracker.cpp
* compiler/cpp/src/parse/t_enum.h


 C++ cppcheck performance related warnings
 -

 Key: THRIFT-3067
 URL: https://issues.apache.org/jira/browse/THRIFT-3067
 Project: Thrift
  Issue Type: Bug
  Components: C++ - Library
Affects Versions: 0.9.2
Reporter: James E. King, III
Priority: Trivial
 Fix For: 0.9.3


 These are performance-related issues identified by cppcheck that could be 
 cleaned up.  Since these are not logic errors per se, I have marked them as 
 trivial:
 {noformat}grep 'performance' /tmp/cppcheck-thrift.issues
 [compiler/cpp/src/parse/t_enum.h:47]: (performance) Function parameter 'name' 
 should be passed by reference.
 [compiler/cpp/src/parse/t_program.h:72]: (performance) Variable 'name_' is 
 assigned in constructor body. Consider performing initialization in 
 initialization list.
 [compiler/cpp/src/parse/t_service.h:48]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [contrib/fb303/TClientInfo.cpp:157] - [contrib/fb303/TClientInfo.cpp:159]: 
 (performance) Variable 'secs' is reassigned a value before the old one has 
 been used.
 [contrib/fb303/cpp/FacebookBase.cpp:101]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [contrib/fb303/cpp/ServiceTracker.cpp:254]: (performance) Prefer prefix ++/-- 
 operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:354]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:448]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.
 [lib/cpp/src/thrift/concurrency/TimerManager.cpp:122]: (performance) Prefer 
 prefix ++/-- operators for non-primitive types.{noformat}
 I also noticed that the TSocket constructor that takes a string argument does 
 so by value instead of by reference.



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


[jira] [Commented] (THRIFT-3110) Print error log after cross test failures on Travis

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3110:


SUCCESS: Integrated in Thrift #1519 (See 
[https://builds.apache.org/job/Thrift/1519/])
THRIFT-3110 Print error log after cross test failures on Travis (roger: rev 
7ed94ef8e82e3aabec05d638c3fc2736f081b0f8)
* .travis.yml


  Print error log after cross test failures on Travis
 

 Key: THRIFT-3110
 URL: https://issues.apache.org/jira/browse/THRIFT-3110
 Project: Thrift
  Issue Type: Improvement
  Components: Test Suite
Reporter: Nobuaki Sukegawa
Priority: Minor

 Currently, there's no way (that I know of) to retrieve cross test error log 
 from Travis-CI when the test failed.
 The patch adds {{after_failure}} entry to allow printing 
 {{nexpected_failure.log}} content to Travis-CI web UI when failed.



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


[jira] [Commented] (THRIFT-3113) m4 C++11 macro issue

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3113:


SUCCESS: Integrated in Thrift #1518 (See 
[https://builds.apache.org/job/Thrift/1518/])
THRIFT-3113 m4 C++11 macro issue (roger: rev 
e856d6846bce5402cc79f7bbaa59897690080017)
* configure.ac
* aclocal/ax_lib_zlib.m4
* aclocal/ax_lib_event.m4
* aclocal/ax_cxx_compile_stdcxx_11.m4


 m4 C++11 macro issue
 

 Key: THRIFT-3113
 URL: https://issues.apache.org/jira/browse/THRIFT-3113
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.9.2
 Environment: Buildroot build system, crosscompilation, C++11
Reporter: Naour Romain
  Labels: build, patch
 Fix For: 0.9.3


 The ax_cxx_compile_stdcxx_11 macro bundled in thrift package is broken  [1] 
 and out of date. Since Thrift actually doesn't use that particular C++11 
 feature, make C++11 support optional.
 [1] https://savannah.gnu.org/patch/index.php?8287



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


[jira] [Resolved] (THRIFT-233) IDL doesn't support negative hex literals

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer resolved THRIFT-233.
---
   Resolution: Fixed
Fix Version/s: 0.9.3

Committed, thanks!

 IDL doesn't support negative hex literals
 -

 Key: THRIFT-233
 URL: https://issues.apache.org/jira/browse/THRIFT-233
 Project: Thrift
  Issue Type: Bug
  Components: Compiler (General)
Reporter: Bryan Duxbury
Assignee: Jens Geyer
Priority: Trivial
 Fix For: 0.9.3


 if you try a field def like
 {code}
 i32 my_field = -0x7fff
 {code}
 the compiler complains. If you try to make the value a two's complement 
 negative number without the sign, then it assumes it was supposed to be a 
 long, and the Java compiler chokes on the assignment. 
 It'd be nice if we supported negative hex literals.



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


[jira] [Resolved] (THRIFT-3114) Using local temp variables to not pollute the global table

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer resolved THRIFT-3114.

   Resolution: Fixed
Fix Version/s: 0.9.3
 Assignee: Jens Geyer

Committed, thanks!

 Using local temp variables to not pollute the global table
 --

 Key: THRIFT-3114
 URL: https://issues.apache.org/jira/browse/THRIFT-3114
 Project: Thrift
  Issue Type: Improvement
  Components: Lua - Compiler
Affects Versions: 1.0
 Environment: Mac OS X 10.9.5, Lua 5.2
Reporter: Xin Li
Assignee: Jens Geyer
 Fix For: 0.9.3


 Should prefix the field deserialization statements with local whenever the 
 output is a temporary variable, for example this compiler output:
 _elem46 = iprot:readI32()
 should be changed to:
 local _elem46 = iprot:readI32().



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


[jira] [Commented] (THRIFT-233) IDL doesn't support negative hex literals

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-233:
---

Github user asfgit closed the pull request at:

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


 IDL doesn't support negative hex literals
 -

 Key: THRIFT-233
 URL: https://issues.apache.org/jira/browse/THRIFT-233
 Project: Thrift
  Issue Type: Bug
  Components: Compiler (General)
Reporter: Bryan Duxbury
Assignee: Jens Geyer
Priority: Trivial
 Fix For: 0.9.3


 if you try a field def like
 {code}
 i32 my_field = -0x7fff
 {code}
 the compiler complains. If you try to make the value a two's complement 
 negative number without the sign, then it assumes it was supposed to be a 
 long, and the Java compiler chokes on the assignment. 
 It'd be nice if we supported negative hex literals.



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


[jira] [Commented] (THRIFT-233) IDL doesn't support negative hex literals

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-233:
---

SUCCESS: Integrated in Thrift #1520 (See 
[https://builds.apache.org/job/Thrift/1520/])
THRIFT-233 IDL doesn't support negative hex literals (jensg: rev 
5ec2121cf283e8d708d22ab3e66c9c7103ecbaf0)
* test/ConstantsDemo.thrift
* compiler/cpp/src/thriftl.ll


 IDL doesn't support negative hex literals
 -

 Key: THRIFT-233
 URL: https://issues.apache.org/jira/browse/THRIFT-233
 Project: Thrift
  Issue Type: Bug
  Components: Compiler (General)
Reporter: Bryan Duxbury
Assignee: Jens Geyer
Priority: Trivial
 Fix For: 0.9.3


 if you try a field def like
 {code}
 i32 my_field = -0x7fff
 {code}
 the compiler complains. If you try to make the value a two's complement 
 negative number without the sign, then it assumes it was supposed to be a 
 long, and the Java compiler chokes on the assignment. 
 It'd be nice if we supported negative hex literals.



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


[jira] [Commented] (THRIFT-3114) Using local temp variables to not pollute the global table

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer commented on THRIFT-3114:


GitHub user xli2012 opened a pull request:

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

Thrift 3114

Using local temp variables to not pollute the global table.

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

$ git pull https://github.com/xli2012/thrift THRIFT-3114

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

https://github.com/apache/thrift/pull/463.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 #463


commit 4ef9028be8f1a132f44e3611043c467962431d1c
Author: Xin Li lixin@gmail.com
Date:   2015-04-25T19:46:29Z

THRIFT-3114 Using local temp variables to not pollute the global table

commit 581559020a5a324199d3f993a3c7ff9208085b90
Author: Xin Li lixin@gmail.com
Date:   2015-04-25T19:54:41Z

refactor default arguments





 Using local temp variables to not pollute the global table
 --

 Key: THRIFT-3114
 URL: https://issues.apache.org/jira/browse/THRIFT-3114
 Project: Thrift
  Issue Type: Improvement
  Components: Lua - Compiler
Affects Versions: 1.0
 Environment: Mac OS X 10.9.5, Lua 5.2
Reporter: Xin Li

 Should prefix the field deserialization statements with local whenever the 
 output is a temporary variable, for example this compiler output:
 _elem46 = iprot:readI32()
 should be changed to:
 local _elem46 = iprot:readI32().



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


[GitHub] thrift pull request: Thrift 3114 Using local temp variables to not...

2015-04-26 Thread Jens-G
Github user Jens-G commented on the pull request:

https://github.com/apache/thrift/pull/463#issuecomment-96361236
  
Tracked in THRIFT-3114



---
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] [Commented] (THRIFT-3114) Using local temp variables to not pollute the global table

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3114:


Github user Jens-G commented on the pull request:

https://github.com/apache/thrift/pull/463#issuecomment-96361236
  
Tracked in THRIFT-3114



 Using local temp variables to not pollute the global table
 --

 Key: THRIFT-3114
 URL: https://issues.apache.org/jira/browse/THRIFT-3114
 Project: Thrift
  Issue Type: Improvement
  Components: Lua - Compiler
Affects Versions: 1.0
 Environment: Mac OS X 10.9.5, Lua 5.2
Reporter: Xin Li

 Should prefix the field deserialization statements with local whenever the 
 output is a temporary variable, for example this compiler output:
 _elem46 = iprot:readI32()
 should be changed to:
 local _elem46 = iprot:readI32().



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


[GitHub] thrift pull request: bugfix/THRIFT-3081 consolidate client process...

2015-04-26 Thread jeking3
Github user jeking3 commented on the pull request:

https://github.com/apache/thrift/pull/460#issuecomment-96369617
  
closing this pull request because the history is too complex; I will submit 
another one that consolidates the changes and omits all the merges I used 
during development.


---
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] [Assigned] (THRIFT-233) IDL doesn't support negative hex literals

2015-04-26 Thread Jens Geyer (JIRA)

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

Jens Geyer reassigned THRIFT-233:
-

Assignee: Jens Geyer

 IDL doesn't support negative hex literals
 -

 Key: THRIFT-233
 URL: https://issues.apache.org/jira/browse/THRIFT-233
 Project: Thrift
  Issue Type: Bug
  Components: Compiler (General)
Reporter: Bryan Duxbury
Assignee: Jens Geyer
Priority: Trivial

 if you try a field def like
 {code}
 i32 my_field = -0x7fff
 {code}
 the compiler complains. If you try to make the value a two's complement 
 negative number without the sign, then it assumes it was supposed to be a 
 long, and the Java compiler chokes on the assignment. 
 It'd be nice if we supported negative hex literals.



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


[GitHub] thrift pull request: THRIFT-3081 consolidate client processing loo...

2015-04-26 Thread jeking3
GitHub user jeking3 opened a pull request:

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

THRIFT-3081 consolidate client processing loop in most TServers

This pull request consolidates the client processing loop in the 
TSimpleServer, TThreadedServer, and TThreadPoolServer.  This ensures the 
servers all handle clients in the same way including in error paths, and 
improves project maintainability by consolidating similar code paths.

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

$ git pull https://github.com/jeking3/thrift 
bugfix/THRIFT-3081-cherry-picked-after-THRIFT-2441-merge-to-master

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

https://github.com/apache/thrift/pull/464.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 #464


commit 5e334132784492369ae2316aae562b7ca965e467
Author: Jim King jim.k...@simplivity.com
Date:   2015-04-26T11:52:40Z

THRIFT-3081 consolidate client processing loop in Simple, Threaded, and 
Thread Pool servers




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


[GitHub] thrift pull request: THRIFT-3081 consolidate client processing loo...

2015-04-26 Thread jeking3
Github user jeking3 closed the pull request at:

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


---
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] [Commented] (THRIFT-3081) C++ Consolidate client processing loops in TServers

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3081:


Github user jeking3 closed the pull request at:

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


 C++ Consolidate client processing loops in TServers
 ---

 Key: THRIFT-3081
 URL: https://issues.apache.org/jira/browse/THRIFT-3081
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Fix For: 0.9.3


 Currently each of TSimpleServer, TThreadedServer, and TThreadPoolServer have 
 their own very similar but not quite identical way of processing a client's 
 lifetime.  The code has been copied around and changed; for example a 
 TThreadPoolServer handles TTransportExceptions from process() differently 
 than a TThreadedServer does.
 There are certain requirements for this processing loop that needs to be met 
 by every client.  Consolidating these three disparate implementations of the 
 client processing loop into one will provide consistency as well as easier 
 maintenance, as there will be one common client processing loop that will 
 contain all the logic from {{eventHandler-createContext}} through 
 {{client-close}}.
 It was also discovered that all three implementations call peek() in each 
 loop which causes more recv calls than are really needed.  Will experiment 
 with removing peek entirely; expectation is that it is sufficient to have 
 exception handling around process() and/or have process() return false to end 
 the processing loop, and peek() is likely an unnecessary temporary band-aid 
 that got left there.
 This was inspired by changes in THRIFT-2441 and I was encouraged to make this 
 a separate body of work from that change so that it can be reviewed in 
 isolation from other changes.



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


[jira] [Updated] (THRIFT-3083) C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, TThreadPoolServer

2015-04-26 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-3083:
---
Description: 
Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

1. Add TServerFramework that implements serve() and stop() for TServer, but is 
abstract.

2. Add virtual methods onClientConnected, onClientDisconnected to 
TServerFramework and require subclasses to implement them.

3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
serve() thread.

4. TThreadedServer::serve() calls TServerFramework::serve() and then waits for 
the notification that all clients are gone.  ::onClientConnected adds a 
TConnectedClient to the task set and starts a thread for it.  
::onClientDisconnected removes the client from the task set.

5. TThreadPoolServer would have similar changes

The resulting classes will be much smaller, and the specific differences 
between the servers will be more obvious.  Further, the server processing loop 
which is common to all three will be in one place.


  was:
Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

1. Add TServerFramework that implements serve() and stop() for TServer, but is 
abstract.

2. Add virtual methods onClientConnected, onClientDisconnected to 
TServerFramework and require subclasses to implement them.

3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
serve() thread.

4. TThreadedServer::serve() calls TServerFramework::serve() and then waits for 
the notification that all clients are gone.  ::onClientConnected adds a 
TConnectedClient to the task set and starts a thread for it.  
::onClientDisconnected removes the client from the task set.

5. TThreadPoolServer would have similar changes

The resulting classes will be much smaller, and the specific differences 
between the servers will be more obvious.  Further, the server processing loop 
which is common to all three will be in one place.

Also add TServerEventHandler::postServe to balance out the fact there is a 
preServe, and document the post-conditions of preServe (TServerTransport is 
being listened to).


 C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, 
 TThreadPoolServer
 

 Key: THRIFT-3083
 URL: https://issues.apache.org/jira/browse/THRIFT-3083
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Attachments: THRIFT-3083-server-files.tar, THRIFT-3083.patch


 Currently the simple and threaded servers all share a very similar serve() 
 workflow.  This improvement story is to consolidate them and extract out the 
 specific differences to limit code duplication.
 1. Add TServerFramework that implements serve() and stop() for TServer, but 
 is abstract.
 2. Add virtual methods onClientConnected, onClientDisconnected to 
 TServerFramework and require subclasses to implement them.
 3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
 serve() thread.
 4. TThreadedServer::serve() calls TServerFramework::serve() and then waits 
 for the notification that all clients are gone.  ::onClientConnected adds a 
 TConnectedClient to the task set and starts a thread for it.  
 ::onClientDisconnected removes the client from the task set.
 5. TThreadPoolServer would have similar changes
 The resulting classes will be much smaller, and the specific differences 
 between the servers will be more obvious.  Further, the server processing 
 loop which is common to all three will be in one place.



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


[GitHub] thrift pull request: THRIFT-3083 consolidate simple and threaded s...

2015-04-26 Thread jeking3
GitHub user jeking3 opened a pull request:

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

THRIFT-3083 consolidate simple and threaded server run loops

Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

The server processing loop which is common to TSimpleServer, 
TThreadedServer, TThreadPoolServer is now in one place.  This improves the 
predictability of thrift and helps improve maintainability.

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

$ git pull https://github.com/jeking3/thrift 
bugfix/THRIFT-3083-following-THRIFT-3081-merge-to-master

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

https://github.com/apache/thrift/pull/466.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 #466


commit 0446bc77d855afa13cb9791011f01f37c91db386
Author: Jim King jim.k...@simplivity.com
Date:   2015-04-26T22:30:26Z

THRIFT-3083 consolidate simple and threaded server run loops




---
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] [Commented] (THRIFT-3083) C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, TThreadPoolServer

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3083:


GitHub user jeking3 opened a pull request:

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

THRIFT-3083 consolidate simple and threaded server run loops

Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

The server processing loop which is common to TSimpleServer, 
TThreadedServer, TThreadPoolServer is now in one place.  This improves the 
predictability of thrift and helps improve maintainability.

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

$ git pull https://github.com/jeking3/thrift 
bugfix/THRIFT-3083-following-THRIFT-3081-merge-to-master

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

https://github.com/apache/thrift/pull/466.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 #466


commit 0446bc77d855afa13cb9791011f01f37c91db386
Author: Jim King jim.k...@simplivity.com
Date:   2015-04-26T22:30:26Z

THRIFT-3083 consolidate simple and threaded server run loops




 C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, 
 TThreadPoolServer
 

 Key: THRIFT-3083
 URL: https://issues.apache.org/jira/browse/THRIFT-3083
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Attachments: THRIFT-3083-server-files.tar, THRIFT-3083.patch


 Currently the simple and threaded servers all share a very similar serve() 
 workflow.  This improvement story is to consolidate them and extract out the 
 specific differences to limit code duplication.
 1. Add TServerFramework that implements serve() and stop() for TServer, but 
 is abstract.
 2. Add virtual methods onClientConnected, onClientDisconnected to 
 TServerFramework and require subclasses to implement them.
 3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
 serve() thread, thus blocking the server thread until the client disconnects.
 4. TThreadedServer::serve() calls TServerFramework::serve() and then waits 
 for the notification that all clients are gone.  ::onClientConnected adds a 
 TConnectedClient to the task set and starts a thread for it.  
 ::onClientDisconnected removes the client from the task set.
 5. TThreadPoolServer would have similar changes.
 The resulting classes will be much smaller, and the specific differences 
 between the servers will be more obvious.  Further, the server processing 
 loop which is common to all three will be in one place.  This improves the 
 predictability of thrift and helps improve maintainability.



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


[jira] [Updated] (THRIFT-3083) C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, TThreadPoolServer

2015-04-26 Thread James E. King, III (JIRA)

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

James E. King, III updated THRIFT-3083:
---
Description: 
Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

1. Add TServerFramework that implements serve() and stop() for TServer, but is 
abstract.

2. Add virtual methods onClientConnected, onClientDisconnected to 
TServerFramework and require subclasses to implement them.

3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
serve() thread, thus blocking the server thread until the client disconnects.

4. TThreadedServer::serve() calls TServerFramework::serve() and then waits for 
the notification that all clients are gone.  ::onClientConnected adds a 
TConnectedClient to the task set and starts a thread for it.  
::onClientDisconnected removes the client from the task set.

5. TThreadPoolServer would have similar changes.

The resulting classes will be much smaller, and the specific differences 
between the servers will be more obvious.  Further, the server processing loop 
which is common to all three will be in one place.  This improves the 
predictability of thrift and helps improve maintainability.


  was:
Currently the simple and threaded servers all share a very similar serve() 
workflow.  This improvement story is to consolidate them and extract out the 
specific differences to limit code duplication.

1. Add TServerFramework that implements serve() and stop() for TServer, but is 
abstract.

2. Add virtual methods onClientConnected, onClientDisconnected to 
TServerFramework and require subclasses to implement them.

3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
serve() thread.

4. TThreadedServer::serve() calls TServerFramework::serve() and then waits for 
the notification that all clients are gone.  ::onClientConnected adds a 
TConnectedClient to the task set and starts a thread for it.  
::onClientDisconnected removes the client from the task set.

5. TThreadPoolServer would have similar changes

The resulting classes will be much smaller, and the specific differences 
between the servers will be more obvious.  Further, the server processing loop 
which is common to all three will be in one place.



 C++ Consolidate server processing loops in TSimpleServer, TThreadedServer, 
 TThreadPoolServer
 

 Key: THRIFT-3083
 URL: https://issues.apache.org/jira/browse/THRIFT-3083
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Attachments: THRIFT-3083-server-files.tar, THRIFT-3083.patch


 Currently the simple and threaded servers all share a very similar serve() 
 workflow.  This improvement story is to consolidate them and extract out the 
 specific differences to limit code duplication.
 1. Add TServerFramework that implements serve() and stop() for TServer, but 
 is abstract.
 2. Add virtual methods onClientConnected, onClientDisconnected to 
 TServerFramework and require subclasses to implement them.
 3. TSimpleServer onClientConnected calls TConnectedClient().run() in the 
 serve() thread, thus blocking the server thread until the client disconnects.
 4. TThreadedServer::serve() calls TServerFramework::serve() and then waits 
 for the notification that all clients are gone.  ::onClientConnected adds a 
 TConnectedClient to the task set and starts a thread for it.  
 ::onClientDisconnected removes the client from the task set.
 5. TThreadPoolServer would have similar changes.
 The resulting classes will be much smaller, and the specific differences 
 between the servers will be more obvious.  Further, the server processing 
 loop which is common to all three will be in one place.  This improves the 
 predictability of thrift and helps improve maintainability.



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


[jira] [Issue Comment Deleted] (THRIFT-1787) Thrift compiling Java Problem

2015-04-26 Thread Tarik Yilmaz (JIRA)

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

Tarik Yilmaz updated THRIFT-1787:
-
Comment: was deleted

(was: This patch works fine under ASCII and non-ASCII directories. Thank you 
for your help.

People who have experienced this issue can find under this issue page. )

 Thrift compiling Java Problem
 -

 Key: THRIFT-1787
 URL: https://issues.apache.org/jira/browse/THRIFT-1787
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.8, 0.9
 Environment: Linux Ubuntu 12.04 LTS
Reporter: Tarik Yilmaz
  Labels: building, compile, java, library, thrift
 Attachments: THRIFT-1787-Thrift-compiling-Java-Problem.patch, 
 terminal-output.txt


 Thrift compile problem...
 - config.log 
 
 configure:16768: checking for javac and java
 Running javac configtest_ax_javac_and_java.java
 Running java configtest_ax_javac_and_java
 Error: Could not find or load main class configtest_ax_javac_and_java
 
 -- $ ./configure -
 ...
 checking for javac and java... no
 checking for ant... no
 checking for ant version  1.7... expr: syntax error
 no
 
 -- $ java -version ---
 java version 1.7.0_09
 Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
 Java HotSpot(TM) Server VM (build 23.5-b02, mixed mode)
 -- $ javac -version --
 javac 1.7.0_09
 -- $ echo $JAVA_HOME --
 /usr/lib/jvm/jdk1.7.0
 -- $ echo $CLASSPATH --
 /usr/lib/jvm/jdk1.7.0/lib:/usr/lib/jvm/jdk1.7.0/jre/lib:.
 Ubuntu 12.04 32bit Oracle Java from Source Code



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


[jira] [Resolved] (THRIFT-3081) C++ Consolidate client processing loops in TServers

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-3081.
-
   Resolution: Fixed
Fix Version/s: 0.9.3

Great work Jim!

Thanks
roger

 C++ Consolidate client processing loops in TServers
 ---

 Key: THRIFT-3081
 URL: https://issues.apache.org/jira/browse/THRIFT-3081
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Fix For: 0.9.3


 Currently each of TSimpleServer, TThreadedServer, and TThreadPoolServer have 
 their own very similar but not quite identical way of processing a client's 
 lifetime.  The code has been copied around and changed; for example a 
 TThreadPoolServer handles TTransportExceptions from process() differently 
 than a TThreadedServer does.
 There are certain requirements for this processing loop that needs to be met 
 by every client.  Consolidating these three disparate implementations of the 
 client processing loop into one will provide consistency as well as easier 
 maintenance, as there will be one common client processing loop that will 
 contain all the logic from {{eventHandler-createContext}} through 
 {{client-close}}.
 It was also discovered that all three implementations call peek() in each 
 loop which causes more recv calls than are really needed.  Will experiment 
 with removing peek entirely; expectation is that it is sufficient to have 
 exception handling around process() and/or have process() return false to end 
 the processing loop, and peek() is likely an unnecessary temporary band-aid 
 that got left there.
 This was inspired by changes in THRIFT-2441 and I was encouraged to make this 
 a separate body of work from that change so that it can be reviewed in 
 isolation from other changes.



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


[jira] [Commented] (THRIFT-3081) C++ Consolidate client processing loops in TServers

2015-04-26 Thread Hudson (JIRA)

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

Hudson commented on THRIFT-3081:


SUCCESS: Integrated in Thrift #1521 (See 
[https://builds.apache.org/job/Thrift/1521/])
THRIFT-3081 consolidate client processing loop in Simple, Threaded, and Thread 
Pool servers (roger: rev 5ec805b22b81001b1b785cd7f85eb8647fde60df)
* lib/cpp/src/thrift/server/TSimpleServer.cpp
* lib/cpp/src/thrift/server/TConnectedClient.h
* lib/cpp/src/thrift/server/TSimpleServer.h
* lib/cpp/Makefile.am
* lib/cpp/src/thrift/server/TThreadedServer.cpp
* lib/cpp/src/thrift/server/TConnectedClient.cpp
* lib/cpp/src/thrift/server/TThreadPoolServer.cpp
* lib/cpp/CMakeLists.txt
* lib/cpp/src/thrift/server/TThreadedServer.h
* lib/cpp/src/thrift/server/TThreadPoolServer.h


 C++ Consolidate client processing loops in TServers
 ---

 Key: THRIFT-3081
 URL: https://issues.apache.org/jira/browse/THRIFT-3081
 Project: Thrift
  Issue Type: Improvement
  Components: C++ - Library
Affects Versions: 0.8, 0.9, 0.9.1, 0.9.2
Reporter: James E. King, III
 Fix For: 0.9.3


 Currently each of TSimpleServer, TThreadedServer, and TThreadPoolServer have 
 their own very similar but not quite identical way of processing a client's 
 lifetime.  The code has been copied around and changed; for example a 
 TThreadPoolServer handles TTransportExceptions from process() differently 
 than a TThreadedServer does.
 There are certain requirements for this processing loop that needs to be met 
 by every client.  Consolidating these three disparate implementations of the 
 client processing loop into one will provide consistency as well as easier 
 maintenance, as there will be one common client processing loop that will 
 contain all the logic from {{eventHandler-createContext}} through 
 {{client-close}}.
 It was also discovered that all three implementations call peek() in each 
 loop which causes more recv calls than are really needed.  Will experiment 
 with removing peek entirely; expectation is that it is sufficient to have 
 exception handling around process() and/or have process() return false to end 
 the processing loop, and peek() is likely an unnecessary temporary band-aid 
 that got left there.
 This was inspired by changes in THRIFT-2441 and I was encouraged to make this 
 a separate body of work from that change so that it can be reviewed in 
 isolation from other changes.



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


[jira] [Comment Edited] (THRIFT-1787) Thrift compiling Java Problem

2015-04-26 Thread Tarik Yilmaz (JIRA)

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

Tarik Yilmaz edited comment on THRIFT-1787 at 4/26/15 8:29 PM:
---

Hi [~roger.meier],

Yes, its works on Oracle JDK 7 and Ubuntu 14.04 x64

Here is my output :
{code}
...
checking for javac and java... yes
checking for ant... /usr/bin/ant
checking for ant version  1.7... yes
...
Java Library:
   Using javac ... : javac
   Using java  : java
   Using ant . : /usr/bin/ant
...
{code}

This line missing in your output :
{code}
checking for javac and java
{code}

I think you are trying to compile from Git repo. Please download thrift from 
thrift.apache.org. 

`sh bootstrap.sh` part is unnecessary.



was (Author: trkylmz):
[~roger.meier]

Yes, its works on Oracle JDK 7 and Ubuntu 14.04 x64

Here is my output :
{code}
...
checking for javac and java... yes
checking for ant... /usr/bin/ant
checking for ant version  1.7... yes
...
Java Library:
   Using javac ... : javac
   Using java  : java
   Using ant . : /usr/bin/ant
...
{code}

This line missing in your output :
{code}
checking for javac and java
{code}

I think you are trying to compile from Git repo. Please download thrift from 
thrift.apache.org. 

`sh bootstrap.sh` part is unnecessary.


 Thrift compiling Java Problem
 -

 Key: THRIFT-1787
 URL: https://issues.apache.org/jira/browse/THRIFT-1787
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.8, 0.9
 Environment: Linux Ubuntu 12.04 LTS
Reporter: Tarik Yilmaz
  Labels: building, compile, java, library, thrift
 Attachments: THRIFT-1787-Thrift-compiling-Java-Problem.patch, 
 terminal-output.txt


 Thrift compile problem...
 - config.log 
 
 configure:16768: checking for javac and java
 Running javac configtest_ax_javac_and_java.java
 Running java configtest_ax_javac_and_java
 Error: Could not find or load main class configtest_ax_javac_and_java
 
 -- $ ./configure -
 ...
 checking for javac and java... no
 checking for ant... no
 checking for ant version  1.7... expr: syntax error
 no
 
 -- $ java -version ---
 java version 1.7.0_09
 Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
 Java HotSpot(TM) Server VM (build 23.5-b02, mixed mode)
 -- $ javac -version --
 javac 1.7.0_09
 -- $ echo $JAVA_HOME --
 /usr/lib/jvm/jdk1.7.0
 -- $ echo $CLASSPATH --
 /usr/lib/jvm/jdk1.7.0/lib:/usr/lib/jvm/jdk1.7.0/jre/lib:.
 Ubuntu 12.04 32bit Oracle Java from Source Code



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


[jira] [Resolved] (THRIFT-2192) autotools on Redhat based systems

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-2192.
-
Resolution: Cannot Reproduce

it's old and we can reopen if required

 autotools on Redhat based systems
 -

 Key: THRIFT-2192
 URL: https://issues.apache.org/jira/browse/THRIFT-2192
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Reporter: Hiroaki Kawai
Assignee: Jake Farrell
  Labels: patch
 Attachments: 0001-Support-for-autotools-on-Redhat-based-systems.patch


 It seems that thirft has been tested on ubuntu ( 
 https://builds.apache.org/job/Thrift/ ), but I could not run bootstrap on 
 Fedora.
 Because of automake 1.12 backward incompatibility, the Makefile.am in 
 compiler/cpp has been troublesome. I could create a workaround for it. The 
 patch was tested on CentOS 6.4 and Fedora 18 with command : `./bootstrap.sh 
  ./configure  make  make dist`
 From the discussion of https://issues.apache.org/jira/browse/THRIFT-646 , 
 autoconf target was set to 2.65. On the other hand, CentOS 6.4 has 2.63 with 
 erlang patched. So I think it is safe to lower it to 2.63 here.



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


[jira] [Commented] (THRIFT-3117) Java TSSLTransportFactory can't load certificates within JAR archive

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-3117:


Github user Smyatkin-Maxim commented on the pull request:

https://github.com/apache/thrift/pull/465#issuecomment-96410210
  
Well, looks like some of the most recent commits have broken the build :)


 Java TSSLTransportFactory can't load certificates within JAR archive
 

 Key: THRIFT-3117
 URL: https://issues.apache.org/jira/browse/THRIFT-3117
 Project: Thrift
  Issue Type: Bug
  Components: Java - Library
Affects Versions: 0.9.2
Reporter: Smyatkin Maxim
Priority: Trivial
 Fix For: 0.9.2

   Original Estimate: 2h
  Remaining Estimate: 2h

 TSSLTransportFactory's setKeyStore/setTrustStore accept only plain file 
 system paths what makes it impossible to use URL's or classpath based 
 resources. E.g., I didn't find a way to load certificate from JAR.
 I propose to look for both URLs and resources if the file can not be found by 
 the given path. It's how it is done in ActiveMQ:
 https://access.redhat.com/documentation/en-US/Fuse_ESB/4.4.1/html/ActiveMQ_Security_Guide/files/SSL-SecureJavaClients.html
 https://github.com/apache/activemq/blob/master/activemq-client/src/main/java/org/apache/activemq/ActiveMQSslConnectionFactory.java#L175-L206



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


[jira] [Resolved] (THRIFT-2127) Autoconf scripting does not properly account for cross-compile

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier resolved THRIFT-2127.
-
Resolution: Fixed

CMake and THRIFT-3113 solves this.

 Autoconf scripting does not properly account for cross-compile
 --

 Key: THRIFT-2127
 URL: https://issues.apache.org/jira/browse/THRIFT-2127
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.9
 Environment: Ubuntu 12.04 running OpenEmbedded Dylan
Reporter: Frank Earl
Assignee: Jake Farrell
 Attachments: fix_autoconf_crosscompile_leaks.patch


 Trying to get Thrift to Cross-compile within OpenEmbedded to get an ARM based 
 build combined with a full-on SDK for our embedded target.  So far, I'm 
 getting this:
 configure:16347: checking for boostlib = 1.40.0
 configure:16401: arm-poky-linux-gnueabi-g++  -march=armv7-a -mthumb-interwork 
 -mfloat-abi=softfp -mfpu=neon 
 --sysroot=/home/fearl/git/dc_image_build/poky/build/tmp/sysroots/beaglebone 
 -c -O2 -pipe -g -feliminate-unused-debug-types -fpermissive 
 -fvisibility-inlines-hidden  -I/usr/include conftest.cpp 5
 cc1plus: warning: include location /usr/include is unsafe for 
 cross-compilation [-Wpoison-system-directories]
 configure:16401: $? = 0
 This means it's grabbing from outside the sysroot- which can present bad 
 results on the cross-compile pass.



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


[jira] [Commented] (THRIFT-2640) Compact Protocol in Cocoa

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2640:


GitHub user creker reopened a pull request:

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

THRIFT-2640: Compact Protocol in Cocoa



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

$ git pull https://github.com/creker/thrift THRIFT-2640

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

https://github.com/apache/thrift/pull/442.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 #442


commit b619aad247185abe4516130fc3eb5d22f5fc5fea
Author: creker sam...@yandex.ru
Date:   2015-04-15T09:02:30Z

Compact Protocol in Cocoa

commit 95fef049cd72e58711d5c439a297cfba778db575
Author: creker sam...@yandex.ru
Date:   2015-04-17T00:26:58Z

Fix non-arc version

commit f6f6967e0a10a145c402abf3754229e55882ac91
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:06:03Z

Code style

commit 98f67d2912ae83e2055190790dd8b67a99cf17af
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:10:12Z

Use only C-style types

commit 04237bf98faac8faab8d34196aa7fb185d8e5cd4
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:15:31Z

Remove superfluous conditional operator

commit d3cc5a78c4bee6eca9885bbff5dc8f3f7cad6c8b
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:36:05Z

Remove superfluous memcpy's

commit 65077ee84de01cca68ec9964cb4133d42a38f598
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:42:28Z

Rename methods to match Cocoa naming guidelines

commit 8ede59356aebf16598e0c00ec9dcbf059346dd69
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:54:19Z

Fill thrift types to compact types mapping array at compile time

commit 51d78ef04ce81695ee0a5c1d0b892533cf14985c
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:30:19Z

Use platform independent types

commit 7cbb6e0367ab4e1474d417a7625ecdf92133c815
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:31:06Z

Add zig-zag explanation

commit 431cd42d8b8b7568d6eda5523088737975b149ba
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:48:35Z

Fix indentation




 Compact Protocol in Cocoa
 -

 Key: THRIFT-2640
 URL: https://issues.apache.org/jira/browse/THRIFT-2640
 Project: Thrift
  Issue Type: Sub-task
  Components: Cocoa - Library
Affects Versions: 0.9.1
Reporter: Mark Hornsby
Assignee: Jens Geyer
Priority: Minor





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


[GitHub] thrift pull request: THRIFT-3117 Java TSSLTransportFactory can't l...

2015-04-26 Thread Smyatkin-Maxim
Github user Smyatkin-Maxim commented on the pull request:

https://github.com/apache/thrift/pull/465#issuecomment-96410210
  
Well, looks like some of the most recent commits have broken the build :)


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


[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa

2015-04-26 Thread creker
GitHub user creker reopened a pull request:

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

THRIFT-2640: Compact Protocol in Cocoa



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

$ git pull https://github.com/creker/thrift THRIFT-2640

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

https://github.com/apache/thrift/pull/442.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 #442


commit b619aad247185abe4516130fc3eb5d22f5fc5fea
Author: creker sam...@yandex.ru
Date:   2015-04-15T09:02:30Z

Compact Protocol in Cocoa

commit 95fef049cd72e58711d5c439a297cfba778db575
Author: creker sam...@yandex.ru
Date:   2015-04-17T00:26:58Z

Fix non-arc version

commit f6f6967e0a10a145c402abf3754229e55882ac91
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:06:03Z

Code style

commit 98f67d2912ae83e2055190790dd8b67a99cf17af
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:10:12Z

Use only C-style types

commit 04237bf98faac8faab8d34196aa7fb185d8e5cd4
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:15:31Z

Remove superfluous conditional operator

commit d3cc5a78c4bee6eca9885bbff5dc8f3f7cad6c8b
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:36:05Z

Remove superfluous memcpy's

commit 65077ee84de01cca68ec9964cb4133d42a38f598
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:42:28Z

Rename methods to match Cocoa naming guidelines

commit 8ede59356aebf16598e0c00ec9dcbf059346dd69
Author: creker sam...@yandex.ru
Date:   2015-04-19T00:54:19Z

Fill thrift types to compact types mapping array at compile time

commit 51d78ef04ce81695ee0a5c1d0b892533cf14985c
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:30:19Z

Use platform independent types

commit 7cbb6e0367ab4e1474d417a7625ecdf92133c815
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:31:06Z

Add zig-zag explanation

commit 431cd42d8b8b7568d6eda5523088737975b149ba
Author: creker sam...@yandex.ru
Date:   2015-04-19T01:48:35Z

Fix indentation




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


[GitHub] thrift pull request: THRIFT-2640: Compact Protocol in Cocoa

2015-04-26 Thread creker
Github user creker closed the pull request at:

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


---
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] [Commented] (THRIFT-2640) Compact Protocol in Cocoa

2015-04-26 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on THRIFT-2640:


Github user creker closed the pull request at:

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


 Compact Protocol in Cocoa
 -

 Key: THRIFT-2640
 URL: https://issues.apache.org/jira/browse/THRIFT-2640
 Project: Thrift
  Issue Type: Sub-task
  Components: Cocoa - Library
Affects Versions: 0.9.1
Reporter: Mark Hornsby
Assignee: Jens Geyer
Priority: Minor





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


[jira] [Commented] (THRIFT-1787) Thrift compiling Java Problem

2015-04-26 Thread Roger Meier (JIRA)

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

Roger Meier commented on THRIFT-1787:
-

does it work on latest source if you use 
sh bootstrap.sh  ./configure ?

 Thrift compiling Java Problem
 -

 Key: THRIFT-1787
 URL: https://issues.apache.org/jira/browse/THRIFT-1787
 Project: Thrift
  Issue Type: Bug
  Components: Build Process
Affects Versions: 0.8, 0.9
 Environment: Linux Ubuntu 12.04 LTS
Reporter: Tarik Yilmaz
  Labels: building, compile, java, library, thrift
 Attachments: THRIFT-1787-Thrift-compiling-Java-Problem.patch, 
 terminal-output.txt


 Thrift compile problem...
 - config.log 
 
 configure:16768: checking for javac and java
 Running javac configtest_ax_javac_and_java.java
 Running java configtest_ax_javac_and_java
 Error: Could not find or load main class configtest_ax_javac_and_java
 
 -- $ ./configure -
 ...
 checking for javac and java... no
 checking for ant... no
 checking for ant version  1.7... expr: syntax error
 no
 
 -- $ java -version ---
 java version 1.7.0_09
 Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
 Java HotSpot(TM) Server VM (build 23.5-b02, mixed mode)
 -- $ javac -version --
 javac 1.7.0_09
 -- $ echo $JAVA_HOME --
 /usr/lib/jvm/jdk1.7.0
 -- $ echo $CLASSPATH --
 /usr/lib/jvm/jdk1.7.0/lib:/usr/lib/jvm/jdk1.7.0/jre/lib:.
 Ubuntu 12.04 32bit Oracle Java from Source Code



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