Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[SLS gateway]feat: support sls pb serialize for java #44

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ZRZ2233
Copy link

@ZRZ2233 ZRZ2233 commented Sep 13, 2023

No description provided.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


zhurenzhu.zrz seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Logs.LogTag.Builder tagBuilder = logs.addLogTagsBuilder();
tagBuilder.setKey(tag.get("Key"));
tagBuilder.setValue(tag.get("Value"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tagBuilder未最终设入到Logs中

Logs.Log.Content.Builder contentBuilder = logsBuilder.addContentsBuilder();
contentBuilder.setKey(realContent.get("Key"));
contentBuilder.setValue(realContent.get("Value"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contentBuilder未最终设到Logs中

public static byte[] readAndCompressBlock(byte[] stream, String compressType) throws Exception {
byte[] compressedData = CompressorFactory.getCompressor(compressType).compress(stream);
return compressedData;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return CompressorFactory.getCompressor(compressType).compress(stream);

} else {
throw new IllegalArgumentException("Invalid body type " + logGroup.getClass());
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!(logGroup instanceof HashMap))
{
        throw;
}
Hash xx = logGroup?

Map xx = xxx

}

ArrayList<Object> logTags = (ArrayList<Object>) body.get("LogTags");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ArrayList -> List


ArrayList<Object> logTags = (ArrayList<Object>) body.get("LogTags");
if (logTags != null && logTags.size() > 0) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!logTags.empty()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants