@Component
public class ConfigurationCommands
extends java.lang.Object
implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.shell.core.CommandMarker, org.springframework.shell.core.ExecutionProcessor
Configuration
object used by other components. Modeled after
GenericOptionsParser
(for usability reasons).Constructor and Description |
---|
ConfigurationCommands() |
Modifier and Type | Method and Description |
---|---|
void |
afterReturningInvocation(org.springframework.shell.event.ParseResult invocationContext,
java.lang.Object result) |
void |
afterThrowingInvocation(org.springframework.shell.event.ParseResult invocationContext,
java.lang.Throwable thrown) |
org.springframework.shell.event.ParseResult |
beforeInvocation(org.springframework.shell.event.ParseResult invocationContext) |
java.lang.String |
getProperty(java.lang.String name) |
java.lang.String |
info() |
java.lang.String |
listProps() |
java.lang.String |
loadConfiguration(java.lang.String location) |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setFs(java.lang.String namenode) |
void |
setProperty(java.lang.String property) |
@CliCommand(value="hadoop config load", help="Loads the Hadoop configuration from the given resource") public java.lang.String loadConfiguration(@CliOption(key={"","location"},mandatory=true,help="configuration location (can be a URL)") java.lang.String location)
@CliCommand(value="hadoop config props set", help="Sets the value for the given Hadoop property") public void setProperty(@CliOption(key={"","property"},mandatory=true,help="what to set, in the form") java.lang.String property)
@CliCommand(value="hadoop config props get", help="Returns the value of the given Hadoop property") public java.lang.String getProperty(@CliOption(key={"","key"},mandatory=true,help="property name") java.lang.String name)
@CliCommand(value="hadoop config props list", help="Returns (all) the Hadoop properties") public java.lang.String listProps()
@CliCommand(value="hadoop config fs", help="Sets the Hadoop namenode") public void setFs(@CliOption(key={"","namenode"},mandatory=true,help="namenode URL - can be file:///|hdfs://: |webhdfs:// : ") java.lang.String namenode)
@CliCommand(value="hadoop config info", help="Returns basic info about the Hadoop configuration") public java.lang.String info()
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
public org.springframework.shell.event.ParseResult beforeInvocation(org.springframework.shell.event.ParseResult invocationContext)
beforeInvocation
in interface org.springframework.shell.core.ExecutionProcessor
public void afterReturningInvocation(org.springframework.shell.event.ParseResult invocationContext, java.lang.Object result)
afterReturningInvocation
in interface org.springframework.shell.core.ExecutionProcessor
public void afterThrowingInvocation(org.springframework.shell.event.ParseResult invocationContext, java.lang.Throwable thrown)
afterThrowingInvocation
in interface org.springframework.shell.core.ExecutionProcessor