You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2019/11/08 15:37:58 UTC

[GitHub] [knox] smolnar82 opened a new pull request #181: KNOX-2100 - Make sure knoxshell initializes logging by using the 'launcher' framework like other products (gateway, cli, ldap) do

smolnar82 opened a new pull request #181: KNOX-2100 - Make sure knoxshell initializes logging by using the 'launcher' framework like other products (gateway, cli, ldap) do
URL: https://github.com/apache/knox/pull/181
 
 
   ## What changes were proposed in this pull request?
   
   Eliminated 1 of the 2 entry points in the `knoxshell.sh`. Only invoking `org.apache.knox.gateway.shell.Shell` results in the `launcher` framework doing its job (setting launcher.name, log4j configuration, etc..). The removed bash logic has been moved to the Java class.
   
   ## How was this patch tested?
   
   Manually tested:
   ```
   $ bin/knoxshell.sh destroy
   
   $ bin/knoxshell.sh list
   Knox token cache does not exist. Please login with init.
   
   $ bin/knoxshell.sh init https://localhost:8443/gateway/sandbox
   Enter username: admin
   Enter password: 
   knoxinit successful!
   Token Type: Bearer
   Expires On: 11/09/2019 02:26:20
   
   Target URL: https://localhost:8443/gateway/tokenbased
   
   $ ls -al logs/
   total 0
   drwxr-xr-x   3 smolnar  staff  102 Nov  8 15:49 .
   drwxr-xr-x  10 smolnar  staff  340 Nov  8 15:49 ..
   -rw-r--r--   1 smolnar  staff    0 Nov  8 15:49 knoxshell.log
   
   $ bin/knoxshell.sh
   2019-11-08 16:26:52.639 java[77845:5642100] unable to obtain configuration from file://localhost/Library/Preferences/com.apple.ViewBridge.plist due to Error Domain=NSCocoaErrorDomain Code=260 "The file “com.apple.ViewBridge.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Library/Preferences/com.apple.ViewBridge.plist, NSUnderlyingError=0x7fbe1f60aa30 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
   ===> org.apache.knox.gateway.shell.KnoxSession
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job, org.apache.knox.gateway.shell.workflow.Workflow
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job, org.apache.knox.gateway.shell.workflow.Workflow, org.apache.knox.gateway.shell.yarn.Yarn
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job, org.apache.knox.gateway.shell.workflow.Workflow, org.apache.knox.gateway.shell.yarn.Yarn, java.util.concurrent.TimeUnit
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job, org.apache.knox.gateway.shell.workflow.Workflow, org.apache.knox.gateway.shell.yarn.Yarn, java.util.concurrent.TimeUnit, org.apache.knox.gateway.shell.manager.Manager
   ===> org.apache.knox.gateway.shell.KnoxSession, org.apache.knox.gateway.shell.hbase.HBase, org.apache.knox.gateway.shell.hdfs.Hdfs, org.apache.knox.gateway.shell.job.Job, org.apache.knox.gateway.shell.workflow.Workflow, org.apache.knox.gateway.shell.yarn.Yarn, java.util.concurrent.TimeUnit, org.apache.knox.gateway.shell.manager.Manager, org.apache.knox.gateway.shell.table.KnoxShellTable
   Groovy Shell (2.5.8, JVM: 1.8.0_212)
   Type ':help' or ':h' for help.
   ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   knox:000> 
   knox:000>
   ```
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services