Announcement Announcement Module
Collapse
No announcement yet.
how to get hdp:configuration from Java Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to get hdp:configuration from Java

    i like hdp:configuration because you can type configuration strings directly into xml.

    <hdp:configuration properties-ref="props" properties-location="cfg-1.properties, cfg-2.properties">
    star=chasing
    captain=eo
    </hdp:configuration>

    how to get instance of this (type Configuration) in application code, what is bean name created by hdp:configuration?

  • #2
    It's "hadoopConfiguration" - the docs (and the XSD) contain the default name and the reason behind it (simply autowiring between components).
    Note that there's nothing preventing you from specifying an id (though in that case, other components that depend on the default config, need to be re-wired).
    If you're doing dependency injection (not lookup) you can just specify @Inject or @Autowired and you're set.

    Comment

    Working...
    X