lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bar Rotstein (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-13007) Use javabin instead of JSON to send messages to overseer
Date Tue, 15 Jan 2019 19:53:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-13007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16743349#comment-16743349
] 

Bar Rotstein commented on SOLR-13007:
-------------------------------------

Observing ZkNodeProps#load:
{code:java}/**
   * Create Replica from json string that is typically stored in zookeeper.
   */
  public static ZkNodeProps load(byte[] bytes) {
    Map<String, Object> props = null;
    if (bytes[0] == 2) {
      try {
        props = (Map<String, Object>) new JavaBinCodec().unmarshal(bytes);
      } catch (IOException e) {
        throw new RuntimeException("Unable to parse javabin content");
      }
    } else {
      props = (Map<String, Object>) Utils.fromJSON(bytes);
    }
    return new ZkNodeProps(props);
  }{code}
Seems like javabin can be quite easily used to send messages to overseer using the work queues,
and then have overseer compute the final cluster state as JSON.
Is that what you had in mind [~noble.paul]?
WDYT?

> Use javabin instead of JSON to send messages to overseer
> --------------------------------------------------------
>
>                 Key: SOLR-13007
>                 URL: https://issues.apache.org/jira/browse/SOLR-13007
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Noble Paul
>            Priority: Major
>
> The messages themselves are ephemeral and the readability is not a big issue. Using javabin
can:
> * reduce the payload size
> * make processing faster



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message