-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60955/#review181217
-----------------------------------------------------------




sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 1 (patched)
<https://reviews.apache.org/r/60955/#comment256698>

    In all other files we have the copyright first, followed by the package 
description.



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 29 (patched)
<https://reviews.apache.org/r/60955/#comment256706>

    Please reformat this file using 2 spaces identation instead of 4 spaces.



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 31 (patched)
<https://reviews.apache.org/r/60955/#comment256700>

    this can be private



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 32 (patched)
<https://reviews.apache.org/r/60955/#comment256699>

    Why is the size specified in the code? Is it the standard practice?



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 38 (patched)
<https://reviews.apache.org/r/60955/#comment256701>

    can be private
    Also, please add javadoc.



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 48 (patched)
<https://reviews.apache.org/r/60955/#comment256708>

    Please add comment, explaining what this function does.



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 50 (patched)
<https://reviews.apache.org/r/60955/#comment256707>

    Where is logname used?



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 57 (patched)
<https://reviews.apache.org/r/60955/#comment256703>

    `</b><br />` is used multiple times - would it make sense to create a 
constant for it?
    
    Also, here and in other places you output the input as-is. This may create 
cross-scripting vulnerability. I think it should be url-escaped first before 
sending out.



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
Lines 73 (patched)
<https://reviews.apache.org/r/60955/#comment256705>

    This is last statement, so return should be ommitted



sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryWebServer.java
Lines 107 (patched)
<https://reviews.apache.org/r/60955/#comment256709>

    Is it possible to move it under /admin ?



sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerLogLevel.java
Lines 48 (patched)
<https://reviews.apache.org/r/60955/#comment256711>

    Please add comment explaining what this (and the next) test case actually 
tests.



sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerLogLevel.java
Lines 54 (patched)
<https://reviews.apache.org/r/60955/#comment256710>

    Can we also check that the actual level is set in the logger?



sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerLogLevel.java
Lines 63 (patched)
<https://reviews.apache.org/r/60955/#comment256712>

    Should it also check that the log level matches whatever logger thinks it 
is?


- Alexander Kolbasov


On July 24, 2017, 7:39 a.m., Donghui Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60955/
> -----------------------------------------------------------
> 
> (Updated July 24, 2017, 7:39 a.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and 
> Na Li.
> 
> 
> Bugs: SENTRY-1853
>     https://issues.apache.org/jira/browse/SENTRY-1853
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Add the log level setting and reading mechanism, through which users can 
> control the log content.
> This mechanism provides the url interface,through which users can dynamically 
> set the log level. Service restores the original log level after restart.
> 
> The format of the interface is as follows:
> 1. Read the log level. URL address is http: //HOST: PORT/logLevel? Log = 
> CLASS_NAME
> 2. Set the log level. URL address is http: //HOST: PORT/logLevel? Log = 
> CLASS_NAME & level = LOG_LEVEL
> 
> The above parameters include:
> HOST: host name or ip address of sentry server.
> PORT: port of sentry server.
> CLASS_NAME: name of class whose log level is read or set.
> LOG_LEVEL: the log level to be set.
> 
> 
> Diffs
> -----
> 
>   
> sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/LogLevelServlet.java
>  PRE-CREATION 
>   
> sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryWebServer.java
>  01f3a0d 
>   
> sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerLogLevel.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60955/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Donghui Xu
> 
>

Reply via email to