Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-2464

Use ConcurrentMap instead of ConcurrentHashMap to avoid runtime errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v2.0.0
    • None
    • None

    Description

      There are some runtime errors happened when code is compiled with high Java version and runs on low Java version, for example:

      Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
      at org.apache.kylin.cube.CubeManager.getInstance(SourceFile:110)
      at org.apache.kylin.tool.CubeMigrationCheckCLI.checkCube(CubeMigrationCheckCLI.java:141)
      at org.apache.kylin.tool.CubeMigrationCheckCLI.execute(CubeMigrationCheckCLI.java:121)
      at org.apache.kylin.tool.CubeMigrationCLI.checkMigrationSuccess(CubeMigrationCLI.java:170)
      at org.apache.kylin.tool.CubeMigrationCLI.moveCube(CubeMigrationCLI.java:156)
      at org.apache.kylin.tool.CubeMigrationCLI.moveCube(CubeMigrationCLI.java:165)
      at io.kyligence.kap.tool.release.KapReleaseCLI.main(KapReleaseCLI.java:66)

      It's a better idea that declaring a variable to be an interface.

      Attachments

        Activity

          People

            Unassigned Unassigned
            wormholer Wang Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: