You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by GitBox <gi...@apache.org> on 2019/07/23 01:36:01 UTC

[GitHub] [helix] pkuwm commented on issue #339: Implementation of stateModelDef modification in REST 2.0

pkuwm commented on issue #339: Implementation of stateModelDef modification in REST 2.0
URL: https://github.com/apache/helix/pull/339#issuecomment-514017940
 
 
   Sounds good!
   
   On Mon, Jul 22, 2019 at 6:34 PM kaisun2000 <no...@github.com> wrote:
   
   > *@kaisun2000* commented on this pull request.
   > ------------------------------
   >
   > In
   > helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/ClusterAccessor.java
   > <https://github.com/apache/helix/pull/339#discussion_r306097170>:
   >
   > > +      @PathParam("clusterId") String clusterId,
   > +      @PathParam("statemodel") String statemodel,
   > +      String content
   > +  ) {
   > +    ZNRecord record;
   > +    try {
   > +      record = toZNRecord(content);
   > +    } catch (IOException e) {
   > +      _logger.error("Failed to deserialize user's input " + content + ", Exception: " + e);
   > +      return badRequest("Input is not a valid ZNRecord!");
   > +    }
   > +    HelixZkClient zkClient = getHelixZkClient();
   > +    String path = PropertyPathBuilder.stateModelDef(clusterId);
   > +    try {
   > +      ZKUtil.createChildren(zkClient, path, record);
   > +    } catch (Exception e) {
   >
   > That is probably beyond the scope of this diff. How about let us keep it
   > this way for now.
   >
   > —
   > You are receiving this because you commented.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/helix/pull/339?email_source=notifications&email_token=ABHSRCIIKZTSBUU45QBA3XTQAZN3XA5CNFSM4IEJMI22YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB7GZ5WY#discussion_r306097170>,
   > or mute the thread
   > <https://github.com/notifications/unsubscribe-auth/ABHSRCMIYA22LBDSSQDG4JDQAZN3XANCNFSM4IEJMI2Q>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services