-
Notifications
You must be signed in to change notification settings - Fork 17
[SLS gateway]feat: support sls pb serialize for java #44
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
base: master
Are you sure you want to change the base?
Conversation
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")); |
There was a problem hiding this comment.
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")); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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()); | ||
} |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!logTags.empty()
No description provided.