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

Yuan Weizhao commented on KYLIN-3461:
-------------------------------------

Hi Shaofeng, thanks for your reply. My point is that, method 
"calculateSignature()" of class "CubeDesc" doesn't  return the same result for 
the same cube in different cases, one is when Kylin is about to build or 
refresh a cube segment, the other is when Kylin tries to refresh cube 
signatures.

I attached two log files, "log-1" is the kylin.log file when I tried to build a 
cube segment, "log-2" is the terminal output when I use "metastore.sh" file to 
"refresh-cube-signatures". You can compare *line 336 of "log-1"* and *line 71 
of "log-2"*, which come from the same logging statement I added at 
"model.CubeDesc:581" to print the calculated signature.

You can see that for the same cube "adfasdfasdf" (excuse me for the messy 
name), method "calculateSignature()" returned different signatures. To take a 
closer look, you can see that the raw signature (the one before encoded by md5 
and base64) in "log-1" is different from that in "log-2", and the difference is 
that the former one has the *additional "encoding_version"* property.

I haven't figured out the root cause of this problem, nor do I have enough time 
for that. This problem can be temporarily avoided by adding  
"kylin.cube.ignore-signature-inconsistency=true" to kylin.properties (please 
ignore my first comment, this configuration DOES work). I am new to Kylin, and 
I'm hoping to get more enlightenment from the experts.

Cheers!

> "metastore.sh refresh-cube-signature" not updating cube signature as expected 
> ------------------------------------------------------------------------------
>
>                 Key: KYLIN-3461
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3461
>             Project: Kylin
>          Issue Type: Bug
>          Components: Client - CLI
>    Affects Versions: v2.3.2
>            Reporter: Yuan Weizhao
>            Priority: Critical
>         Attachments: build-cube-log.png, 
> log-2-calculate-signature-when-refresh-cube-signature.log, 
> log1-calculate-signature-when-building.log, refresh-cube-signature-log.png
>
>
> Recently I upgraded kylin from 2.3.1 to 2.3.2, and when I tried to build a 
> cube, the Web UI told me that my cube signature is inconsistent, and 
> suggested that I use the metastore.sh script to refresh all cube signatures. 
>  I did what I was told to, but as I can read from the log, the script didn't 
> update any cube signature, and I still received the same error message when I 
> retried to build the cube.
>  I did some digging on the source code, and add some logging statements, 
> re-packaged kylin and deployed the more-logging version. I found that when 
> kylin refreshes cube signatures and build new cube segments, it always check 
> whether the cube signature equals to the calculated signature which is 
> calculated by method 
> org.apache.kylin.cube.model.CubeDesc#calculateSignature().
> And as I observed from the log, this method return DIFFERENT RESULT under the 
> above two occasions!
> The Difference lies in that when building cube segments invokes 
> calculateSignature(), it will add "encoding_version" into the "rowkey" json 
> string.



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

Reply via email to