[jira] [Updated] (AVRO-1282) Make use of the sun.misc.Unsafe class during serialization if a JDK supports it

2013-04-17 Thread Leo Romanoff (JIRA)

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

Leo Romanoff updated AVRO-1282:
---

Attachment: avro-1282-v3.patch

Use getRecordState-based approach, as suggested by Doug

 Make use of the sun.misc.Unsafe class during serialization if a JDK supports 
 it
 ---

 Key: AVRO-1282
 URL: https://issues.apache.org/jira/browse/AVRO-1282
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Leo Romanoff
Priority: Minor
 Attachments: avro-1282-v1.patch, avro-1282-v2.patch, 
 avro-1282-v3.patch


 Unsafe can be used to significantly speed up serialization process, if a JDK 
 implementation supports java.misc.Unsafe properly. Most JDKs running on PCs 
 support it. Some platforms like Android lack a proper support for Unsafe yet.
 There are two possibilities to use Unsafe for serialization:
 1) Very quick access to the fields of objects. It is way faster than with the 
 reflection-based approach using Field.get/set
 2) Input and Output streams can be using Unsafe to perform very quick 
 input/output.
  
 3) More over, Unsafe makes it possible to serialize to/deserialize from 
 off-heap memory directly and very quickly, without any intermediate buffers 
 allocated on heap. There is virtually no overhead compared to the usual byte 
 arrays.

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


[jira] [Commented] (AVRO-1299) SpecificRecordBase implements GenericRecord

2013-04-17 Thread Doug Cutting (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13634199#comment-13634199
 ] 

Doug Cutting commented on AVRO-1299:


Patch looks good but also includes changes for AVRO-1295.

 SpecificRecordBase implements GenericRecord
 ---

 Key: AVRO-1299
 URL: https://issues.apache.org/jira/browse/AVRO-1299
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Christophe Taton
Priority: Minor
 Fix For: 1.7.5

 Attachments: AVRO-1299.20130416-25.patch


 Code written for generic records should be directly applicable on equivalent 
 specific records.

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


[jira] [Commented] (AVRO-1282) Make use of the sun.misc.Unsafe class during serialization if a JDK supports it

2013-04-17 Thread Doug Cutting (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13634205#comment-13634205
 ] 

Doug Cutting commented on AVRO-1282:


This is looking good.  I think FieldAccess.java is missing from the patch.

 Make use of the sun.misc.Unsafe class during serialization if a JDK supports 
 it
 ---

 Key: AVRO-1282
 URL: https://issues.apache.org/jira/browse/AVRO-1282
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Leo Romanoff
Priority: Minor
 Attachments: avro-1282-v1.patch, avro-1282-v2.patch, 
 avro-1282-v3.patch


 Unsafe can be used to significantly speed up serialization process, if a JDK 
 implementation supports java.misc.Unsafe properly. Most JDKs running on PCs 
 support it. Some platforms like Android lack a proper support for Unsafe yet.
 There are two possibilities to use Unsafe for serialization:
 1) Very quick access to the fields of objects. It is way faster than with the 
 reflection-based approach using Field.get/set
 2) Input and Output streams can be using Unsafe to perform very quick 
 input/output.
  
 3) More over, Unsafe makes it possible to serialize to/deserialize from 
 off-heap memory directly and very quickly, without any intermediate buffers 
 allocated on heap. There is virtually no overhead compared to the usual byte 
 arrays.

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


[jira] [Updated] (AVRO-1299) SpecificRecordBase implements GenericRecord

2013-04-17 Thread Christophe Taton (JIRA)

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

Christophe Taton updated AVRO-1299:
---

Attachment: AVRO-1299.20130417-101039.patch

Sorry for that, here is an updated diff against the latest trunk.

 SpecificRecordBase implements GenericRecord
 ---

 Key: AVRO-1299
 URL: https://issues.apache.org/jira/browse/AVRO-1299
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Christophe Taton
Priority: Minor
 Fix For: 1.7.5

 Attachments: AVRO-1299.20130416-25.patch, 
 AVRO-1299.20130417-101039.patch


 Code written for generic records should be directly applicable on equivalent 
 specific records.

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


[jira] [Updated] (AVRO-1282) Make use of the sun.misc.Unsafe class during serialization if a JDK supports it

2013-04-17 Thread Leo Romanoff (JIRA)

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

Leo Romanoff updated AVRO-1282:
---

Attachment: avro-1282-v4.patch

Include files that were forgotten in previous patch

 Make use of the sun.misc.Unsafe class during serialization if a JDK supports 
 it
 ---

 Key: AVRO-1282
 URL: https://issues.apache.org/jira/browse/AVRO-1282
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Leo Romanoff
Priority: Minor
 Attachments: avro-1282-v1.patch, avro-1282-v2.patch, 
 avro-1282-v3.patch, avro-1282-v4.patch


 Unsafe can be used to significantly speed up serialization process, if a JDK 
 implementation supports java.misc.Unsafe properly. Most JDKs running on PCs 
 support it. Some platforms like Android lack a proper support for Unsafe yet.
 There are two possibilities to use Unsafe for serialization:
 1) Very quick access to the fields of objects. It is way faster than with the 
 reflection-based approach using Field.get/set
 2) Input and Output streams can be using Unsafe to perform very quick 
 input/output.
  
 3) More over, Unsafe makes it possible to serialize to/deserialize from 
 off-heap memory directly and very quickly, without any intermediate buffers 
 allocated on heap. There is virtually no overhead compared to the usual byte 
 arrays.

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


[jira] [Commented] (AVRO-1282) Make use of the sun.misc.Unsafe class during serialization if a JDK supports it

2013-04-17 Thread Leo Romanoff (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13634356#comment-13634356
 ] 

Leo Romanoff commented on AVRO-1282:


@Doug: Sorry, I forgot that git needs git diff HEAD instead of simple git 
diff to include new files. Now the patch should be complete, which makes it 
possible to test it.

 Make use of the sun.misc.Unsafe class during serialization if a JDK supports 
 it
 ---

 Key: AVRO-1282
 URL: https://issues.apache.org/jira/browse/AVRO-1282
 Project: Avro
  Issue Type: Improvement
  Components: java
Affects Versions: 1.7.4
Reporter: Leo Romanoff
Priority: Minor
 Attachments: avro-1282-v1.patch, avro-1282-v2.patch, 
 avro-1282-v3.patch, avro-1282-v4.patch


 Unsafe can be used to significantly speed up serialization process, if a JDK 
 implementation supports java.misc.Unsafe properly. Most JDKs running on PCs 
 support it. Some platforms like Android lack a proper support for Unsafe yet.
 There are two possibilities to use Unsafe for serialization:
 1) Very quick access to the fields of objects. It is way faster than with the 
 reflection-based approach using Field.get/set
 2) Input and Output streams can be using Unsafe to perform very quick 
 input/output.
  
 3) More over, Unsafe makes it possible to serialize to/deserialize from 
 off-heap memory directly and very quickly, without any intermediate buffers 
 allocated on heap. There is virtually no overhead compared to the usual byte 
 arrays.

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


[jira] [Commented] (AVRO-1296) Python: schemas retrieved from protocol types ignore namespace

2013-04-17 Thread Philip Zeyliger (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13634527#comment-13634527
 ] 

Philip Zeyliger commented on AVRO-1296:
---

Patches look good to me.  Unless there are objections, I'll commit tomorrow or 
so.

 Python: schemas retrieved from protocol types ignore namespace
 --

 Key: AVRO-1296
 URL: https://issues.apache.org/jira/browse/AVRO-1296
 Project: Avro
  Issue Type: Bug
  Components: python
Affects Versions: 1.7.4
Reporter: Jeremy Kahn
Assignee: Jeremy Kahn
 Fix For: 1.7.5

 Attachments: AVRO-1296a.patch, AVRO-1296b.patch


 If I parse a protocol {{p}} using {{avro.protocol.parse}}, which defines 
 {{namespace: ns}} and then retrieve a child schema {{s}} from the 
 protocol's {{proto.types}} (or {{proto.types_dict}}), then {{s}} does not 
 have its namespace set (to {{ns}}), even if {{p}} has a namespace.
 This is particularly problematic if I'm using {{s}} to write out an avro file 
 intended to be read by a specific-type reader, because the file header will 
 claim to be objects of type {{s}} (not {{ns.s}}, as expected).
 I've attached two patches: one that makes sure that the {{namespace}} 
 property of protocol types is set to the default namespace of the protocol 
 when not otherwise set.
 The second patch ensures that the {{namespace}} is *not* rendered into JSON 
 when a default protocol specifies the right value already.

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