Andrew Wong has posted comments on this change.

Change subject: Add json builder utility
......................................................................


Patch Set 1:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/7387/1//COMMIT_MSG
Commit Message:

PS1, Line 10: It is intended solely
            : for building json objects, not writing/parsing.
How, if at all, is the EasyJson class meant to interact with JsonReader and 
JsonWriter?


http://gerrit.cloudera.org:8080/#/c/7387/1/src/kudu/util/jsonbuilder.h
File src/kudu/util/jsonbuilder.h:

Line 1: // Licensed to the Apache Software Foundation (ASF) under one
> I thought maybe it should be, but I was trying to stay consistent with json
FWIW I think it might be helpful if the classname was consistent in that way as 
well.


PS1, Line 93: ~EasyJsonAllocator() = default;
Is this needed?


PS1, Line 83: // One instance of EasyJsonAllocator is shared amongst a root
            :   // EasyJson object and all of its descendants. The allocator
            :   // owns the underlying rapidjson Value, and a rapidjson
            :   // allocator (via a rapidjson::Document).
            :   class EasyJsonAllocator : public RefCounted<EasyJsonAllocator> {
            :    public:
            :     rapidjson::Value& value() { return value_; }
            :     rapidjson::Document::AllocatorType& allocator() { return 
doc_.GetAllocator(); }
            :    private:
            :     friend class RefCounted<EasyJsonAllocator>;
            :     ~EasyJsonAllocator() = default;
            : 
            :     rapidjson::Value value_;
            :     rapidjson::Document doc_;
            :   };
I don't recall seeing internal classes like this in the codebase. Do we do this 
elsewhere?

Alternatively, you could consider putting this class in namespace internal


-- 
To view, visit http://gerrit.cloudera.org:8080/7387
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie195b06c5ba67af3043d2032c56b90c1a85f641a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Sam Okrent <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Sam Okrent <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

Reply via email to