concept CLI in category hadoop

This is an excerpt from Manning's book Hadoop in Practice, Second Edition.
If you attempt to use the CLI when the application is still running, you’ll be presented with the following error message:
$ yarn logs -applicationId application_1398974791337_0070 Application has not completed. Logs are only available after an application completesThe message tells it all—the CLI is only useful once an application has completed. You’ll need to use the UI to access the container logs when the application is running, which we’ll cover shortly.
The CLI is handy for quickly running commands and for scripting. However, it incurs the overhead of forking a separate process for each command, which is overhead that you’ll probably want to avoid, especially if you’re interfacing with HDFS in a programming language. This technique covers working with HDFS in languages other than Java (which is covered in a subsequent section).