Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor the serializer of hessian and protobuf. #116

Merged
merged 1 commit into from
May 13, 2018

Conversation

ujjboy
Copy link
Member

@ujjboy ujjboy commented May 13, 2018

Motivation:

Start to using the com.alipay.sofa.rpc.codec.Serializer, and refactor the serializer of hessian and protobuf.

Modification:

  • Delete field serializeFactoryType from SofaRequest because it is only used by Hessian
  • Add ByteArrayWrapperByteBuf and ByteStreamWrapperByteBuf.
  • Refactor Hessian and protobuf serializer in remoting-bolt to codec-sofa-hessian and codec-protobuf
  • Add more test cases.

Result:

@ujjboy ujjboy added enhancement New feature or request remove Remove feature or request labels May 13, 2018
@ujjboy ujjboy added this to the 5.4.0 milestone May 13, 2018
@codecov-io
Copy link

Codecov Report

Merging #116 into master will increase coverage by 0.87%.
The diff coverage is 80.4%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #116      +/-   ##
===========================================
+ Coverage     64.92%   65.8%   +0.87%     
- Complexity      617     647      +30     
===========================================
  Files           266     270       +4     
  Lines         11406   11407       +1     
  Branches       1908    1903       -5     
===========================================
+ Hits           7405    7506     +101     
+ Misses         3014    2939      -75     
+ Partials        987     962      -25
Impacted Files Coverage Δ Complexity Δ
...rpc/common/struct/UnsafeByteArrayOutputStream.java 51.51% <ø> (+3.03%) 0 <0> (ø) ⬇️
...nericMultipleClassLoaderSofaSerializerFactory.java 100% <ø> (ø) 15 <0> (?)
.../com/alipay/sofa/rpc/common/RemotingConstants.java 0% <ø> (ø) 0 <0> (ø) ⬇️
.../com/alipay/sofa/rpc/common/utils/StringUtils.java 83.67% <ø> (ø) 0 <0> (ø) ⬇️
...sian/MultipleClassLoaderSofaSerializerFactory.java 86.66% <ø> (ø) 4 <0> (?)
...ofa/rpc/codec/sofahessian/BlackListFileLoader.java 77.55% <ø> (ø) 13 <0> (?)
...essian/SingleClassLoaderSofaSerializerFactory.java 66.66% <ø> (ø) 8 <0> (?)
...GenericSingleClassLoaderSofaSerializerFactory.java 68% <ø> (ø) 9 <0> (?)
.../rpc/common/struct/UnsafeByteArrayInputStream.java 34.14% <ø> (ø) 0 <0> (ø) ⬇️
.../com/alipay/sofa/rpc/core/request/SofaRequest.java 93.02% <ø> (+21.28%) 0 <0> (ø) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c42e1a0...9d75fec. Read the comment docs.

@ujjboy ujjboy merged commit 19cf47e into sofastack:master May 13, 2018
@ujjboy ujjboy deleted the fix_issue_110 branch May 13, 2018 18:11
NeGnail added a commit to NeGnail/sofa-rpc that referenced this pull request May 15, 2018
Refactor the serializer of hessian and protobuf. (sofastack#116)
This was referenced May 22, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request remove Remove feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants