Apache Ignite作业计划配置

时间:2018-01-24 13:39:30

标签: apache scheduler scheduling jobs ignite

我试图安排点火工作,但我想我无法正确设置配置文件。找不到任何有效的完整示例或教程是不可能的。此外,没有名为“ignite-scheduler”的文件@ apache-ignite-fabric-2.2.0-bin \ libs \ optional

以下是错误消息:

[2018-01-24 13:34:33,127][ERROR][pub-#55][GridJobWorker] Failed to execute job [jobId=48dabb72161-e972e997-06fa-492d-97f4-bf1b0d261a66, ses=GridJobSessionImpl [ses=GridTaskSessionImpl [taskName=o.a.i.examples.Driver$1, dep=GridDeployment [ts=1516790072917, depMode=SHARED, clsLdr=sun.misc.Launcher$AppClassLoader@2a139a55, clsLdrId=37dabb72161-e972e997-06fa-492d-97f4-bf1b0d261a66, userVer=0, loc=true, sampleClsName=o.a.i.i.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap, pendingUndeploy=false, undeployed=false, usage=2], taskClsName=o.a.i.examples.Driver$1, sesId=28dabb72161-e972e997-06fa-492d-97f4-bf1b0d261a66, startTime=1516790073047, endTime=9223372036854775807, taskNodeId=e972e997-06fa-492d-97f4-bf1b0d261a66, clsLdr=sun.misc.Launcher$AppClassLoader@2a139a55, closed=false, cpSpi=null, failSpi=null, loadSpi=null, usage=1, fullSup=false, internal=false, subjId=e972e997-06fa-492d-97f4-bf1b0d261a66, mapFut=IgniteFuture [orig=GridFutureAdapter [ignoreInterrupts=false, state=INIT, res=null, hash=1228587967]], execName=null], jobId=48dabb72161-e972e997-06fa-492d-97f4-bf1b0d261a66]]
class org.apache.ignite.IgniteException: Current Ignite configuration does not support schedule functionality (consider adding ignite-schedule module to classpath).
    at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1858)
    at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:566)
    at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6631)
    at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:560)
    at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:489)
    at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

这是儿童conf xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    <!-- Imports default Ignite configuration -->
    <import resource="example-default.xml"/>

    <bean parent="ignite.cfg"/>
</beans>

这是父conf xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util.xsd">
    <bean abstract="true" id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
        <!-- Set to true to enable distributed class loading for examples, default is false. -->
        <property name="peerClassLoadingEnabled" value="true"/>

        <!-- Enable task execution events for examples. -->
        <property name="includeEventTypes">
            <list>
                <!--Task execution events-->
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>

                <!--Cache events-->
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
                <util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
            </list>
        </property>

        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Ignite provides several options for automatic discovery that can be used
                        instead os static IP based discovery. For information on all options refer
                        to our documentation: http://apacheignite.readme.io/docs/cluster-config
                    -->
                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                    <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> -->
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace with actual host IP address. -->
                                <value>10.106.2.30:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

任何有点燃工作安排经验的人?

1 个答案:

答案 0 :(得分:2)

ignite-schedule是可选的LGPL依赖项,它不是Apache Ignite二进制发行版的一部分。

您可以自己从代码中构建它。

或者,您可以从其他来源下载它。以下是有关它的信息:https://ignite.apache.org/download.cgi#3rdparty