| ######################################### |
| ### This is the default configuration for gearpump |
| ### To use the application, you at least need to change gearpump.cluster to point to right master |
| ######################################### |
| |
| ### Configurations that are shared by all services and all user applications... |
| gearpump { |
| |
| ############################## |
| ### Required to change!! |
| ### You need to set the master cluster address here |
| ### |
| ### |
| ### For example, you may start three master |
| ### on node1: bin/master -ip node1 -port 3000 |
| ### on node2: bin/master -ip node2 -port 3000 |
| ### on node3: bin/master -ip node3 -port 3000 |
| ### |
| ### Then you need to set the cluster.masters = ["node1:3000","node2:3000","node3:3000"] |
| cluster { |
| masters = ["127.0.0.1:3000"] |
| } |
| |
| ############################## |
| ### Required to change!! |
| ### You need to set the actual host name here |
| ### |
| hostname = "127.0.0.1" |
| |
| ## How many slots each worker contains |
| worker.slots = 1000 |
| |
| ## The class responsable for launching the executor process. |
| ## User can switch to "org.apache.gearpump.cluster.worker.CGroupProcessLauncher" to enable CGroup support. |
| worker.executor-process-launcher = "org.apache.gearpump.cluster.worker.DefaultExecutorProcessLauncher" |
| |
| ## To enable worker use cgroup to make resource isolation, |
| ## set gearpump.worker.executor-process-launcher = "org.apache.gearpump.cluster.worker.CGroupProcessLauncher" |
| ## |
| ## Before enable it, you should also make sure: |
| ## 1. Linux version (>= 2.6.18) |
| ## 2. Have installed cgroup (check the file's existence:/proc/cgroups) |
| ## You can get more information from http://gearpump.apache.org/releases/latest/deployment-resource-isolation.html |
| ## |
| ## For cgroup root, it represents the root node in CGroup's hierarchythe. |
| ## It's full path in local file system is "${cpu_mount_point} + root". |
| ## The cpu_mount_point is the cpu subsystem's mount poing in CGroup. |
| ## The root dir should be consistent with the part configured in /etc/cgconfig.conf |
| cgroup { |
| root = "gearpump" |
| |
| ## This config only works when cgroup is enabled. |
| ## The value means the number of CPU cores per executor can use, -1 means no limitation. |
| cpu-core-limit-per-executor = 1 |
| } |
| |
| ## Whether to enable remote-debug mode. |
| ## In remote debug mode, every executor process will bind to a free port, and |
| ## listen for remote jvm debug. |
| remote-debug-executor-jvm = false |
| |
| ### When the resource cannot be allocated in the timeout, then |
| ### the appmaster will shutdown itself. |
| resource-allocation-timeout-seconds = 120 |
| |
| ## |
| ## Executor share same process of worker |
| worker.executor-share-same-jvm-as-worker = false |
| |
| ## Number of executors to launch when starting an application |
| application.executor-num = 1 |
| |
| ########################### |
| ### Change the dispather for tasks |
| ### If you don't know what this is about, don't change it |
| ########################### |
| |
| task-dispatcher = "gearpump.shared-thread-pool-dispatcher" |
| |
| ### verbose gc |
| ### turn on JVM verbose GC |
| ### We will use -verbose:gc -Xloggc: -XX:+PrintGCDetails |
| ### -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution |
| ### -XX:+PrintGCApplicationConcurrentTime |
| ### -XX:+PrintGCApplicationStoppedTime |
| verbose-gc = false |
| |
| ########################### |
| ### Metrics setting, |
| ### If you want to use metrics, please change |
| ########################### |
| |
| ### Flag to enable metrics |
| metrics { |
| enabled = true |
| |
| ### We will take one metric out of ${sample.rate} |
| ### This config will slightly impact the application's performance, larger rate often brings higher throughput. |
| sample-rate = 1 |
| |
| report-interval-ms = 3000 |
| |
| # reporter = "logfile" |
| # reporter = "graphite" |
| reporter = "akka" |
| |
| graphite { |
| ## Graphite host settings |
| host = "127.0.0.1" |
| port = 2003 |
| } |
| |
| logfile { |
| |
| } |
| |
| ## Coarse-grain history metrics, which have a larger timespan but sparse data points |
| retainHistoryData { |
| # max hours of history data to retain |
| # Note: due to implementation limitation(we store all history in memory), |
| # please don't set this to too big which may exhaust memory. |
| hours = 72 |
| |
| # time interval between two data points for history data (unit: ms) |
| # Usually this value is set to a big value so that we only store |
| # coarse-grain data |
| intervalMs = 3600000 |
| } |
| |
| ## fine-grain recent metrics which just happened, which have a smaller timespan but dense data points |
| retainRecentData { |
| |
| # max seconds of recent data to retain, |
| # THis is for the fine-grain data |
| seconds = 300 |
| |
| # time interval between two data points for recent data (unit: ms) |
| intervalMs = 15000 |
| } |
| akka { |
| ### For this reporter, at most we will return max-limit-on-query metric item. |
| max-limit-on-query = 1000 |
| |
| ### Whitelist for Metrics Aggregator class. |
| ### See class [[MetricsAggregator]] for more information. |
| metrics-aggregator-class { |
| ## Format org.apache.gearpump.KeyFullClassName = "" |
| } |
| } |
| } |
| |
| ####################################### |
| ### Logging settings |
| ####################################### |
| # The log dir for daemon processes |
| log.daemon.dir = "logs" |
| |
| # The log dir for applications |
| log.application.dir = "logs" |
| |
| serializers { |
| ## Follow this format when adding new serializer for new message types |
| # "yourpackage.YourClass" = "yourpackage.YourSerializerForThisClass" |
| |
| ## If you intend to use default serializer for this class, then you can write this |
| # "yourpackage.YourClass" = "" |
| } |
| |
| ### client's timeout (in second) to connect to master and wait for the response |
| masterclient.timeout = 90 |
| |
| ### Gearpump has built-in serialization framework using Kryo. |
| ### User are allowed to use a different serialization framework, like Protobuf |
| ### See [org.apache.gearpump.serializer.FastKryoSerializationFramework] to find how |
| ### a custom serialization framework can be defined. |
| serialization-framework = "org.apache.gearpump.serializer.FastKryoSerializationFramework" |
| |
| ### Define where the submitted jar file will be stored at |
| |
| ### This path follows the hadoop path schema |
| ### For HDFS, use hdfs://host:port/path/ |
| ### For HDFS HA, use hdfs://namespace/path/ |
| ### For shared NFS folder, use file:///your_nfs_mapping_directory |
| ### jarstore.rootpath = "jarstore/" will points to relative directory where master is started. |
| ### jarstore.rootpath = "/jarstore/" will points to absolute directory on master server |
| jarstore.rootpath = "jarstore/" |
| |
| ######################### |
| ### Scheduller for master, it will use this scheduler to schedule resource for |
| ### different applications. |
| ### If you don't know what is this about, don't change it |
| ######################### |
| scheduling { |
| scheduler-class = "org.apache.gearpump.cluster.scheduler.PriorityScheduler" |
| } |
| |
| ############################################# |
| # Default Configuration for REST, WebSocket, Http services |
| ############################################# |
| |
| ######################### |
| ### services can be started by a command line tool bin/services |
| ### If you don't know what is this about, don't change it |
| ######################### |
| services { |
| host = "0.0.0.0" |
| http = 8090 |
| supervisor-actor-path = "" |
| |
| ## To get a detail config string with origin and comments, change this to false. |
| config-render-option-concise = true |
| } |
| |
| ## Time out setting to start a new executor system |
| ## It takes a bit longer time than expected as a new JVM is created |
| start-executor-system-timeout-ms = 120000 |
| |
| ############################################# |
| ## Default Configuration for Gearpump Netty transport layer |
| ## If you don't know what is this about, don't change it |
| ############################################# |
| netty { |
| buffer-size = 5242880 |
| max-retries = 30 |
| base-sleep-ms = 100 |
| max-sleep-ms = 1000 |
| message-batch-size = 262144 |
| flush-check-interval = 5 |
| dispatcher = "gearpump.shared-thread-pool-dispatcher" |
| } |
| |
| ################### |
| ### Appmaster JVM argument configuration |
| ################### |
| appmaster { |
| vmargs = "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3 -Djava.rmi.server.hostname=localhost" |
| extraClasspath = "" |
| } |
| |
| ################### |
| ### Executor argument configuration |
| ### Executor JVM can contains multiple tasks |
| ################### |
| executor { |
| vmargs = "-server -Xms512M -Xmx1024M -Xss1M -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseParNewGC -XX:NewRatio=3 -Djava.rmi.server.hostname=localhost" |
| extraClasspath = "" |
| } |
| |
| ### Streaming related configuration |
| streaming { |
| ## We will timeout the task if it cannot register itself to AppMaster in time. |
| register-task-timeout-ms = 120000 |
| |
| ## ack once after sending ack-once-every-message-count messages. |
| ack-once-every-message-count = 100 |
| |
| ## max pending message per task to task connection. If pending message size is |
| ## over this, then the flow control will not allow further sending. |
| ## This value should be bigger than ack-once-every-message-count |
| max-pending-message-count-per-connection = 1000 |
| } |
| |
| ################################## |
| ### Akka Dispatcher configurations |
| ### If you don't know what is this about, don't change it |
| ################################## |
| shared-thread-pool-dispatcher { |
| mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox" |
| throughput = 100 |
| fork-join-executor { |
| parallelism-factor = 2 |
| parallelism-max = 8 |
| parallelism-min = 2 |
| } |
| } |
| |
| single-thread-dispatcher { |
| type = PinnedDispatcher |
| } |
| |
| ########################### |
| ### Configuration for yarn module |
| ########################### |
| yarn { |
| client { |
| package-path = "/usr/lib/gearpump/gearpump.zip" |
| } |
| |
| applicationmaster { |
| ## Memory of YarnAppMaster |
| command = "$JAVA_HOME/bin/java -Xmx512m" |
| memory = "512" |
| vcores = "1" |
| queue = "default" |
| } |
| |
| master { |
| ## Memory of master daemon |
| command = "$JAVA_HOME/bin/java -Xmx512m" |
| memory = "512" |
| vcores = "1" |
| } |
| |
| worker { |
| ## memory of worker daemon |
| command = "$JAVA_HOME/bin/java -Xmx512m" |
| containers = "1" |
| ## This also contains all memory for child executors. |
| memory = "4096" |
| vcores = "1" |
| } |
| services { |
| enabled = true |
| } |
| } |
| } |
| |
| ### Configuration only visible to master nodes.. |
| gearpump-master { |
| extensions = [ |
| "akka.cluster.ddata.DistributedData$" |
| ] |
| akka { |
| ######################################### |
| ### For log level of Master, you need to change both log4j.properties and this entry |
| ######################################### |
| loglevel = "INFO" |
| |
| log-dead-letters = off |
| log-dead-letters-during-shutdown = off |
| actor { |
| ## Master forms a akka cluster |
| provider = "akka.cluster.ClusterActorRefProvider" |
| } |
| cluster { |
| roles = ["master"] |
| ## TODO: in integration test, 15s may be too small |
| ## auto-down-unreachable-after = 90s |
| ## The value of this setting will impact master HA recovery time |
| auto-down-unreachable-after = 15s |
| } |
| remote { |
| log-remote-lifecycle-events = off |
| } |
| } |
| } |
| |
| ### Configuration only visible to worker nodes... |
| gearpump-worker { |
| ## Add worker overrided config |
| akka { |
| ######################################### |
| ### For log level of Worker, you need to change both log4j.properties and this entry |
| ######################################### |
| loglevel = "INFO" |
| log-dead-letters = off |
| log-dead-letters-during-shutdown = off |
| actor { |
| provider = "akka.remote.RemoteActorRefProvider" |
| } |
| cluster { |
| roles = ["worker"] |
| } |
| remote { |
| log-remote-lifecycle-events = off |
| } |
| } |
| } |
| |
| ######################################### |
| ### For log level of Akka class, you need to change both log4j.properties and this entry |
| ######################################### |
| #akka.loglevel = "INFO" |
| |
| ### configurations only visible to UI server. |
| gearpump-ui { |
| ## Security related settings |
| gearpump.ui-security { |
| |
| ## Whether enable authentication for UI Server |
| authentication-enabled = false |
| |
| ## User-Password based authenticator |
| ## |
| ## User-Password based authenticator is always enabled when |
| ## gearpump.ui-security.authentication-enabled = true |
| ## |
| ## With User-Password based authenticator inplace, user can still enable auxiliary |
| ## authentication channel like OAuth2. |
| ## |
| ## User can replace this with a custom User-Password based authenticator, |
| ## which implements interface org.apache.gearpump.security.Authenticator |
| ## |
| authenticator = "org.apache.gearpump.security.ConfigFileBasedAuthenticator" |
| |
| ## Configuration options for authenticator org.apache.gearpump.security.ConfigFileBasedAuthenticator |
| config-file-based-authenticator = { |
| ## Format: username = "password_hash_value" |
| ## password_hash_value can be generated by running shell tool: |
| ## bin/gear org.apache.gearpump.security.PasswordUtil -password <your raw password> |
| |
| ## Admin users have super permission to do everything |
| admins = { |
| ## Default Admin. Username: admin, password: admin |
| ## !!! Please replace this builtin account for production cluster for security reason. !!! |
| "admin" = "AeGxGOxlU8QENdOXejCeLxy+isrCv0TrS37HwA==" |
| } |
| |
| ## normal user have special permission for certain operations. |
| users = { |
| ## "user" = "AeGxGOxlU8QENdOXejCeLxy+isrCv0TrS37HwA==" |
| } |
| |
| ## Guest user can only view the UI with minimum permission. With no permission to submit/change/kill |
| ## a running application. |
| guests = { |
| ## Default guest. Username: guest, Password: guest |
| ## !!! Please replace this builtin account for production cluster for security reason. !!! |
| "guest" = "ws+2Dy/FHX4cBb3uKGTR64kZWlWbC91XZRRoew==" |
| } |
| } |
| |
| ## Whether to enable auxiliary OAuth2 Authentication channel. |
| ## |
| ## NOTE: This requires config {{{gearpump.ui-security.authentication-enabled = true}}} |
| ## |
| ## NOTE: User-Password based authenticator will also be enabled. |
| ## |
| ## NOTE: OAuth2 authentication requires that the Gearpump server can directly access the OAuth2 server. |
| ## Please make sure you have configured web proxy properly if applies. |
| ## To configure http proxy on Windows: |
| ## {{{ |
| ## > set JAVA_OPTS=-Dhttp.proxyHost=xx.com -Dhttp.proxyPort=8088 -Dhttps.proxyHost=xx.com -Dhttps.proxyPort=8088 |
| ## > bin\services |
| ## }}} |
| ## |
| ## To configure http proxy on Linux: |
| ## {{{ |
| ## $ export JAVA_OPTS="-Dhttp.proxyHost=xx.com -Dhttp.proxyPort=8088 -Dhttps.proxyHost=xx.com -Dhttps.proxyPort=8088" |
| ## $ bin/services |
| ## }}} |
| oauth2-authenticator-enabled = true |
| oauth2-authenticators { |
| ## Please modify the list if you have customized OAuth2 provider, like Facebook, Twitter... |
| |
| ## OAuth2 Authenticator with Google Plus+ |
| ## |
| ## For steps to enable OAuth2 Authentication on Google, please view docs/deployment-ui-authentication.md |
| ## |
| "google" { |
| "class" = "org.apache.gearpump.services.security.oauth2.impl.GoogleOAuth2Authenticator" |
| |
| ## Please replace "127.0.0.1:8090" with your address of UI service. |
| "callback" = "http://127.0.0.1:8090/login/oauth2/google/callback" |
| |
| ## Client Id and client secret you applied on Google. |
| ## |
| ## !!NOTE!! Replace clientID and clientSecret with your own application to avoid |
| ## potential privacy leakage, the values set here represents as a test application. |
| "clientid" = "170234147043-a1tag68jtq6ab4bi11jvsj7vbaqcmhkt.apps.googleusercontent.com" |
| "clientsecret" = "ioeWLLDipz2S7aTDXym2-obe" |
| |
| ## The default role we assign to user when user get authenticated by Google. |
| ## |
| ## TODO: should allow some user group have a different role, like admin. |
| ## |
| ## Available values: guest, user, admin, with: |
| ## 1. guest can only view the application status, |
| ## 2. user can submit and modify application. |
| ## 3. admin can manage the cluster resource, like adding or removing machines. |
| "default-userrole" = "guest" |
| |
| ## Login icon disiplayed on UI server frontend |
| icon = "/icons/google.png" |
| } |
| |
| ## OAuth2 Authenticator for CloudFoundry UAA server (https://github.com/cloudfoundry/uaa/). |
| ## |
| ## For steps to enable OAuth2 Authentication for UAA, please view docs/deployment-ui-authentication.md |
| ## |
| "cloudfoundryuaa" { |
| "class" = "org.apache.gearpump.services.security.oauth2.impl.CloudFoundryUAAOAuth2Authenticator" |
| |
| ## Please replace "127.0.0.1:8090" with your address of UI service. |
| "callback" = "http://127.0.0.1:8090/login/oauth2/cloudfoundryuaa/callback" |
| |
| ## Client Id and client secret you applied on UAA. |
| ## |
| ## !!NOTE!! Replace clientID and clientSecret with your own application to avoid |
| ## potential privacy leakage, the values set here serves as a test application. |
| "clientid" = "<your client id registered on UAA>" |
| "clientsecret" = "<your client secret registered on UAA>" |
| |
| ## The default role we assign to user when user get authenticated by UAA. |
| ## |
| ## TODO: should allow some user group have a different role, like admin. |
| ## |
| ## Available values: guest, user, admin, with: |
| ## 1. guest can only view the application status, |
| ## 2. user can submit and modify application. |
| ## 3. admin can manage the cluster resource, like adding or removing machines. |
| "default-userrole" = "guest" |
| |
| ## Login icon disiplayed on UI server frontend |
| icon = "/icons/uaa.png" |
| |
| ## Cloud Foundry UAA Login Endpoint. Prefixed by "http://" or "https://" |
| ## |
| ## !!NOTE!! Please relace uaahost with your actual Cloudfounudry UAA login endpoint, the |
| ## value set here serves as an example. |
| uaahost = "http://<cloud foundry login endpoint>" |
| |
| ## Whether to enable additional authorization check. |
| ## If the user fails the check, then Gearpump would log user out. |
| additional-authenticator-enabled = true |
| |
| ## Define how to do additional authorization check. The class should implement |
| ## interface CloudFoundryUAAOAuth2Authenticator.AdditionalAuthenticator |
| additional-authenticator = { |
| "class" = "org.apache.gearpump.services.security.oauth2.impl.CloudFoundryUAAOAuth2Authenticator$OrganizationAccessChecker" |
| |
| ## Please fill the Cloud Foundry API endpoint and organization GUID |
| "organization-url" = "http://<cloud foundry api endpoint>/v2/organizations/<organization-guid>" |
| } |
| } |
| } |
| } |
| |
| ## Akka http dispatcher settings. |
| akka.stream.materializer.dispatcher = "gearpump.ui-default-dispatcher" |
| |
| ## Timeout settings for akka-http |
| akka.http.server.idle-timeout = 300 s |
| |
| ## When uploading a large job jar, it takes a long time to launch the job jar in cluster |
| ## before we respond to client. |
| akka.http.server.request-timeout = 600 s |
| } |
| |
| ## Configurations only visible on Linux or Mac. |
| gearpump-linux { |
| ### On windows, the value must be larger than 10ms, check |
| ### https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Scheduler.scala#L204 |
| akka.scheduler.tick-duration = 1 |
| } |