[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2018-01-22 Thread Pan, Julian (JIRA)

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

Pan, Julian commented on KYLIN-2939:


Thanks a lot, [~Zhixiong Chen]

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Fix For: v2.3.0
>
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



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


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-12-19 Thread Zhixiong Chen (JIRA)

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

Zhixiong Chen commented on KYLIN-2939:
--

OK.I know what you mean.
Then it's fine to me.
I will merge it into KYLIN master.

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-12-19 Thread Pan, Julian (JIRA)

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

Pan, Julian commented on KYLIN-2939:


BTW, we have some special logic between different env (QA & PROD), which 
reproduce this issue.

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-12-19 Thread Pan, Julian (JIRA)

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

Pan, Julian commented on KYLIN-2939:


In the front-end, if I want to get kylin.env, it will return 
kylin.env.hdfs-working-dir value. If kylin.env.hdfs-working-dir is before 
kylin.env.
The code:
 var keyIndex = _config.indexOf(name);
which will get index kylin.env.hdfs-working-dir, cause 
kylin.env.hdfs-working-dir include kylin.env.
Then it will return kylin.env.hdfs-working-dir's value instead of kylin.env.
If there is no contain properties, it should works will for the old code. But 
in 2.1 there are contain properties, which will produce this issue.
My patch is get index include = and break row:
var keyIndex = _config.indexOf('\n' + name + '=');
Which will resolve this issue.

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-12-10 Thread Zhixiong Chen (JIRA)

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

Zhixiong Chen commented on KYLIN-2939:
--

I think there is no problem with the old code.
Could you show more detail about it ?

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-12-08 Thread Shaofeng SHI (JIRA)

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

Shaofeng SHI commented on KYLIN-2939:
-

Zhixiong, please review and merge the patch.

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
> Attachments: KYLIN_2939.patch
>
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KYLIN-2939) Get config properties not correct in UI

2017-10-17 Thread Zhixiong Chen (JIRA)

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

Zhixiong Chen commented on KYLIN-2939:
--

Could you give a patch?[~julianpan]

> Get config properties not correct in UI
> ---
>
> Key: KYLIN-2939
> URL: https://issues.apache.org/jira/browse/KYLIN-2939
> Project: Kylin
>  Issue Type: Bug
>  Components: Web 
>Reporter: Pan, Julian
>Assignee: Pan, Julian
>Priority: Critical
>
> When I want to get kylin.env by getDeployEnv(), it will return 
> kylin.env.hdfs-working-dir value. There is a bug in getProperty in 
> kylinProperties.js.
> This function will return first properties will contains this name.
> Here is the fix:
> this.getProperty = function (name) {
> var keyIndex = _config.indexOf('\n' + name + '=');
> var keyLength = name.length;
> var partialResult = _config.substr(keyIndex);
> var preValueIndex = partialResult.indexOf("=");
> var sufValueIndex = partialResult.indexOf("\n", 2);
> return partialResult.substring(preValueIndex + 1, sufValueIndex);
>   }
> If necessary, I can create a patch for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)