dockerzhang opened a new issue #672:
URL: https://github.com/apache/incubator-inlong/issues/672


   <p>1. remove duplicate block</p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
   <pre class="code-java">
   <span class="code-keyword">catch</span> (<span 
class="code-keyword">final</span> Exception e) {
       logger.error(<span class="code-quote">"Put message failed "</span>, e);
       strBuffer.delete(0, strBuffer.length());
       builder.setSuccess(<span class="code-keyword">false</span>);
       builder.setErrCode(TErrCodeConstants.INTERNAL_SERVER_ERROR);
       builder.setErrMsg(strBuffer.append(<span class="code-quote">"Put message 
failed from "</span>)
       .append(tubeConfig.getHostName()).append(<span class="code-quote">" 
"</span>)
       .append((e.getMessage() != <span class="code-keyword">null</span> ? 
e.getMessage() : <span class="code-quote">" "</span>)).toString());
       <span class="code-keyword">return</span> builder.build();
   } <span class="code-keyword">catch</span> (<span 
class="code-keyword">final</span> Throwable ex) {
       logger.error(<span class="code-quote">"Put message failed "</span>, ex);
       strBuffer.delete(0, strBuffer.length());
       builder.setSuccess(<span class="code-keyword">false</span>);
       builder.setErrCode(TErrCodeConstants.INTERNAL_SERVER_ERROR);
       builder.setErrMsg(strBuffer.append(<span class="code-quote">"Put message 
failed from "</span>)
       .append(tubeConfig.getHostName()).append(<span class="code-quote">" 
"</span>)
       .append((ex.getMessage() != <span class="code-keyword">null</span> ? 
ex.getMessage() : <span class="code-quote">" "</span>)).toString());
       <span class="code-keyword">return</span> builder.build();
   }
   </pre>
   </div></div>
   <p>2.  remove inner if</p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
   <pre class="code-java">
   <span class="code-keyword">if</span> (request.getCheckSum() != -1) {
        <span class="code-keyword">if</span> (checkSum != 
request.getCheckSum()) {
     builder.setErrCode(TErrCodeConstants.FORBIDDEN);
     builder.setErrMsg(strBuffer.append(<span class="code-quote">"Checksum msg 
data failure: "</span>)
   .append(request.getCheckSum()).append(<span class="code-quote">" of 
"</span>).append(reqTopic)
   .append(<span class="code-quote">" not equal to the data's checksum of 
"</span>)
   .append(checkSum).toString());
      <span class="code-keyword">return</span> builder.build();
          }
   }
   </pre>
   </div></div>
   <p>3. fix some typos<br/>
        transferedMessageList -> transferMessageList<br/>
        cosnumer -> consumer</p>
   
   <p>4. modify log print </p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
   <pre class="code-java">
   logger.info(strBuffer.append(<span class="code-quote">"[Consumer 
Register]"</span>).append(clientId)
       .append(TokenConstants.SEGMENT_SEP).append(partStr)
       .append(TokenConstants.SEGMENT_SEP).append(offsetInfo)
       .append(<span class="code-quote">", 
requestOffset="</span>).append(reqOffset)
       .append(<span class="code-quote">", req has SSD 
storeId="</span>).append(request.hasSsdStoreId())
       .append(<span class="code-quote">", req 
qryPriorityId="</span>).append(reqQryPriorityId)
       .append(<span class="code-quote">", cur SSD 
storeId="</span>).append(reqSsdStoreId)
       .append(<span class="code-quote">", 
isOverTLS="</span>).append(overtls).toString());
   </pre>
   </div></div>
   <p>     to below :</p>
   <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
   <pre class="code-java">
   logger.info(strBuffer.append(<span class="code-quote">"[Consumer 
Register]"</span>).append(clientId)
       .append(TokenConstants.SEGMENT_SEP).append(partStr)
       .append(TokenConstants.SEGMENT_SEP).append(offsetInfo)
       .append(<span class="code-quote">", reqOffset="</span>).append(reqOffset)
       .append(<span class="code-quote">", 
reqSsdStoreId="</span>).append(reqSsdStoreId)
       .append(<span class="code-quote">", 
reqQryPriorityId="</span>).append(reqQryPriorityId)
       .append(<span class="code-quote">", 
isOverTLS="</span>).append(overtls).toString());
   </pre>
   </div></div>
   
   
   
   <i>JIRA link - <a 
href="https://issues.apache.org/jira/browse/INLONG-73";>[INLONG-73]</a> created 
by technoboy</i>


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to