Ozone components depends on maven classpath. We generate classpath descriptor from the maven pom.xml files to use exactly the same classpath at runtime.

As a result, it's easy to start All the components in IDE (eg. IntelliJ) as the right classpath (without provided scope) has already been set.

Since HDDS-1715 we have provide ready-to-use IntelliJ run configurations.

To start Ozone from Intellij you need the following:

(1) Stop your Intellij

(2) Execute the helper shell script:

./hadoop-ozone/dev-support/intellij/install-runconfigs.sh

Note: helper script doesn't do any special, just copy the committed runners to the right location in your intellij project folder.

(3) Start IntelliJ

As a result you can find the new run entries under the Run menu:

To run ozone, you can use the installed Run configurations in the following order:

  1. StorageContainerManagerInit (to initialize the SCM dir)
  2. StorageContainerManger (to start SCM)
  3. OzoneManagerInit (to initialize OM, it requires SCM)
  4. OzoneManager
  5. Datanode

Note: as of now we support only one datanode, but supporting multiple datanode processes can be added.

Troubleshooting

Problem: Intellij not picking up protoc generated classes.

  1. There is a file under intellij – generally where you have installed/downloaded intellij.
  2. This file is called  /Applications/idea/idea.app/Contents/bin/idea.properties under MacOS and generally under your home directory if you are on Linux.
  3. Edit this file, there is a property called
  4. idea.max.intellisense.filesize=2500 -- set this value to 5000

  5. Restart Intellij, this assumes that your editor/ machine has enough RAM to process this file.

Problem: For Ubuntu 18.04+ the default openjdk is 11, had the following errors:  java: No SupportedSourceVersion annotation found on org.apache.hadoop.hdds.conf.ConfigFileGenerator, returning RELEASE_6.
java: Supported source version 'RELEASE_6' from annotation processor 'org.apache.hadoop.hdds.conf.ConfigFileGenerator' less than -source '8 as well as java: package sun.misc does not exist

Through the intellij project structure settings configured to use java 8 sdk to resolve missing 
sun.misc.SignalHandler issue.  

  • No labels