Skip to content

Latest commit

 

History

History
200 lines (191 loc) · 9.68 KB

application-config-guide.adoc

File metadata and controls

200 lines (191 loc) · 9.68 KB

metatron Application Configuration Guide

The metatron application configuration is configured in yaml format. The "application-config.templete.yaml" file provided by the distribution binary is provided as an example, and you can specify detailed settings based on the information below.

Common properties in metatron depends on the spring boot configuration. Therefore, if you need additional settings, please refer to the link.

spring:
  http:
    multipart: # Used to adjust the maximum size when uploading files
      max-file-size: 300Mb
      max-request-size: 300Mb
  # The default value is set according to the setting of the METATRON_DB_TYPE value(h2 or mysql) in metatron-env.sh.
  # If you want additional configuration, it is recommended to manage only connection pool or jpa related properties.
  # If you want to set up a new data source type, you can change it from the 'platform' property.
  datasource:
    platform: mysql
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/polaris_v2?useUnicode=true&characterEncoding=utf8
    username: polaris
    password: polaris
    # Below is the connection pool related configuration.
    max-active: 50
    max-idle: 10
    min-idle: 10
    initial-size: 10
    test-on-borrow: false
    test-on-return: false
    test-while-idle: true
    max-wait: 1000
    validation-query: SELECT 1
  jpa:
    show-sql: false
    properties:
      hibernate:
        jdbc:
          batch_size: 25
        order_inserts: true
        order_updates: true
        dialect: org.hibernate.dialect.MySQL5InnoDBDialect
      org:
        hibernate:
          envers:
            store_data_at_delete: true
server:
  port: 8180 # If you want to change the port
  tomcat:
    ajp: # You can allow ajp connection with the following settings.
      enabled: false
      protocol: AJP/1.3
      port: 8280
logging:
  # If you want to set up a separate log, create a separate file to specify the path to the file.
  # Please refer to https://logback.qos.ch/manual/configuration.html
  config: classpath:logback-console.xml
  mail: # Mail(SMTP) server properties
    host: localhost
    port: 25
    username:
    password:

The application-related properties are prefixed with "polaris" and categorized by domain.

polaris:
  format:
    # Specify a datetime format that is recommended when performing validation on a column of type timestamp.
    datetimes:
      - 'yy-MM-dd'
      - 'dd/MM/yyyy'
  storage:
    # The stagedb concept is internally used as an intermediary processing medium when processing large amounts of data
    # when ingesting or transforming data in an application. We are using hive and specify the information related to it.
    stagedb:
      hostname: localhost # for hiveserver
      port: 10000         # for hiveserver
      username: hive      # for hiveserver
      password: hive      # for hiveserver
      metastore: # specify additional information when you want to get more information such as partitions.
        uri: thrift://localhost:9083
        jdbc:
          url: jdbc:mysql://metatron-web-01:3306/hive
          username: hive
          password: hive
  engine:
    # Specify representative access url by engine node, application requires only 3 nodes
    hostname:
      broker: http://localhost:8082
      overlord: http://localhost:8090
      coordinator: http://localhost:8081
    ingestion:
      # Used when forwarding files from an application to an engine cluster when loading local files
      loader:
        remoteType: SSH # "LOCAL" is the default value, but if the engine is configured as a separate cluster, use "SSH" mode for remote communication.
        localBaseDir: ${java.io.tmpdir:-/tmp}
        remoteDir: ${java.io.tmpdir:-/tmp}
        # Specifies the host information where the middle manager node is located.
        hosts:
          middlemanager01: # It must be the hostname recognized by the engine. Refer to the worker hostname on the engine console.
            port: 22
            username: metatron
            password: pem:${METATRON_HOME}/pem/user-metatron.pem # Specify "pem" prefix and pem file location if you use pem file when connecting to remote host
          "[middlemanager.01]": # If the host name contains "." If included, display like this
            port: 22
            username: metatron
            password: metatron_password
    query:
      loader: # Unlike in "ingestion", when downloading query results, it is used to transfer download file generated by engine to application
        remoteType: LOCAL
        localBaseDir: ${java.io.tmpdir:-/tmp}
    notification:
      type: broker,overload,coordinator,historical,middleManager # Specify the server type to be notified.
      slack:
        hookUrl: # Specify the slack webhook URL.
        channel: # Specifies the slack channel name to receive notifications.
  datasource:
    ingestion:
      retries: # Retry properties used when checking the status of engine when ingestion
        delay: 3
        maxDelay: 90
        maxDuration : 3600
  mail:                            # Additional information for mail notifications
    admin: [email protected]      # Specify representative manager email
    baseUrl: http://localhost:8180 # Specify connection url for linking metatron contents in mail
  workbench:
    defaultResultSize: 1000        # Row number of results to display by default on the screen
    maxResultSize: 1000000         # The maximum row number of results that a user can specify
    maxFetchSize: 1000             # Fetch size when loading sql results, only applies to supported db library
    tempCSVPath: /tmp              # Specify a directory to temporarily store query results
  dataprep:
    localBaseDir: ${user.home}/dataprep                       # Where uploaded files, local file snapshots, serialized previews are stored
    hadoopConfDir: /etc/hadoop                                # Set $HADOOP_CONF_DIR
    stagingBaseDir: hdfs://localhost:9000/user/hive/dataprep  # Where uploaded files, HDFS file snapshots, files for Hive external tables are stored
    sampling:
      timeout: 20       # Timeout for rule edit sessions
    etl:
      timeout: 36000    # Timeout for generating snapshots
  extensions:
      lnb:                          # Specify the menu to add to the LNB.
        - name: one depth menu      # Specify 1st depth menu name
          parent: ROOT              # Specify "ROOT" to be on the top menu. In the case of "ROOT", it is displayed in the LNB if a lower depth menu exists.
          permissions:
            - PERM_NAME     # Specify a list of PERM_NAME. If not specified, all users can access.
        - name: two depth menu      # Specify 2nd depth menu name
          parent: one depth menu    # Specify the parent menu name including "management" and "administration". If the menu name of the upper depth does not exist, it is not displayed.
          subContents:
            menu name: URL         # Specify the menu name as key and the URL(http://~~) to link to as value.
          permissions:
            - PERM_NAME     # Specify a list of PERM_NAME. If not specified, all users with permissions in the upper depth menu can access.
        - name: Engine Monitoring   # for Engine(Druid) Monitoring
          permissions:
            - PERM_NAME     # Specify a list of PERM_NAME. If not specified, all users with permissions in the upper depth menu can access.
  static-path:     # Specify the absolute path of "/static/*" resources.
  user:
    use_organization: false               # if true, the organization concept is activated
    password:
      strength:                           # Password management settings
        numberOfNumericCharacter: 1       # Number of numeric Character (default : 1), -1 to disable
        numberOfAlphabeticalCharacter: 1  # Number of alphabetical Character (default : 1), -1 to disable
        numberOfSpecialCharacter: 1       # Number of special Character (default : 1), -1 to disable
        minLength: 10                     # Minimum length (default : 10)
        maxLength: 20                     # Maximum length (default : 20)
        repeatLimit: 4                    # Maximum character repeatability (default : 4), -1 to disable
      requiredChangePeriod: P6M           # The password must be changed within that period. (ISO 8601 Duration Format)
      minimumUsePeriod: P1D               # The password cannot be changed again within that period. (ISO 8601 Duration Format)
      lockCount: 5                        # The Password must match within that number.
      countOfHistory: -1                  # This is the past history number to compare when changing the password. -1 to Disable
      excludeLockUsername: [polaris]      # Whitelist except login password lock. (default: admin)
  mobile:
    resource-path: classpath:resource-mobile/  # You can specify the location of web resources for mobile services. (You can use "file" schema as resource path format. ex. "file:/resource-mobile")
    client-id: polaris_client                  # If you have a client ID for mobile service, you can specify it.
  mapbox:
    accesstoken:                          # mapbox accesstoken
  activity_stream:
    excludes:                             # exclusion conditions not to save activity stream, list of key/value object
      -
        action: ARRIVE                    # key : activity stream properties (action, actorId, remoteHost, objectId, etc..)
        ...