首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >org.apache.gobblin.example.wikipedia.WikipediaSource示例异常:ClassNotFoundException: QuickStart

org.apache.gobblin.example.wikipedia.WikipediaSource示例异常:ClassNotFoundException: QuickStart
EN

Stack Overflow用户
提问于 2017-10-18 09:14:56
回答 2查看 688关注 0票数 1

我正在学习地精跟随快速启动,子部分“将妖精作为守护进程运行”。

我一步一步地做,作为指南:

  1. 创建配置dir并设置环境变量GOBBLIN_JOB_CONFIG_DIR,并将wikipedia.pull放入其中;
  2. 创建work并设置环境变量GOBBLIN_WORK_DIR。
  3. 启动Gobblin:./bin/gobblin-standalone.sh开始

代码语言:javascript
复制
    floyddeMac-mini:gobblin-dist floyd$ echo $GOBBLIN_JOB_CONFIG_DIR
    /Users/floyd/plugin/gobblin-dist/config_dir

    floyddeMac-mini:gobblin-dist floyd$ echo $GOBBLIN_WORK_DIR
    /Users/floyd/plugin/gobblin-dist/work_dir

    floyddeMac-mini:gobblin-dist floyd$ echo $JAVA_HOME
    /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home

    floyddeMac-mini:gobblin-dist floyd$ ls $GOBBLIN_JOB_CONFIG_DIR/*
    /Users/floyd/plugin/gobblin-dist/config_dir/wikipedia.pull

我在日志中发现了异常:

代码语言:javascript
复制
1 2017-10-18 16:29:43 CST INFO  [main] gobblin.runtime.app.ServiceBasedAppLauncher  163 - Starting the Gobblin application and all its associated Services
  2 2017-10-18 16:29:43 CST INFO  [JobScheduler STARTING] gobblin.scheduler.JobScheduler  179 - Starting the job scheduler
  3 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.impl.StdSchedulerFactory  1172 - Using default implementation for ThreadExecutor
  4 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.core.SchedulerSignalerImpl  61 - Initialized Scheduler Signaller of type: class org.quar    tz.core.SchedulerSignalerImpl
  5 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.core.QuartzScheduler  240 - Quartz Scheduler v.2.2.3 created.
  6 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.simpl.RAMJobStore  155 - RAMJobStore initialized.
  7 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.core.QuartzScheduler  305 - Scheduler meta-data: Quartz Scheduler (v2.2.3) 'LocalJobSche    duler' with instanceId 'NON_CLUSTERED'
  8   Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  9   NOT STARTED.
 10   Currently in standby mode.
 11   Number of jobs executed: 0
 12   Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 3 threads.
 13   Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
 14
 15 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.impl.StdSchedulerFactory  1327 - Quartz scheduler 'LocalJobScheduler' initialized from s    pecified file: '/Users/fanjun/plugin/gobblin-dist/conf/quartz.properties'
 16 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.impl.StdSchedulerFactory  1331 - Quartz scheduler version: 2.2.3
 17 2017-10-18 16:29:43 CST INFO  [SchedulerService STARTING] org.quartz.core.QuartzScheduler  575 - Scheduler LocalJobScheduler_$_NON_CLUSTERED started.
 18 2017-10-18 16:29:44 CST WARN  [JobScheduler STARTING] org.apache.hadoop.util.NativeCodeLoader  62 - Unable to load native-hadoop library for your platform...     using builtin-java classes where applicable
 19 2017-10-18 16:29:44 CST INFO  [JobScheduler STARTING] gobblin.scheduler.JobScheduler  413 - Scheduling configured jobs
 20 2017-10-18 16:29:44 CST INFO  [JobScheduler STARTING] gobblin.scheduler.JobScheduler  427 - Loaded 1 job configurations
 21 2017-10-18 16:29:44 CST INFO  [JobScheduler-0] gobblin.util.ClustersNames  74 - no default cluster mapping found
 22 2017-10-18 16:29:44 CST WARN  [JobScheduler-0] gobblin.runtime.AbstractJobLauncher  200 - Creating a job specific SharedResourcesBroker. Objects will only be     shared at the job level.
 23 2017-10-18 16:29:45 CST INFO  [JobScheduler-0] org.reflections.Reflections  229 - Reflections took 466 ms to scan 43 urls, producing 645 keys and 2317 values
 24 2017-10-18 16:29:45 CST INFO  [JobScheduler-0] gobblin.util.reflection.GobblinConstructorUtils  86 - Found accessible constructor for class class gobblin.run    time.FsDatasetStateStore with parameter types [class org.apache.hadoop.fs.LocalFileSystem, class java.lang.String, class java.lang.Integer, class com.google.    common.cache.LocalCache$LocalLoadingCache].
 25 2017-10-18 16:29:45 CST WARN  [JobScheduler-0] gobblin.runtime.JobContext  298 - Property task.data.root.dir is missing.
 26 2017-10-18 16:29:45 CST ERROR [JobScheduler-0] gobblin.scheduler.JobScheduler$NonScheduledJobRunner  519 - Failed to run job PullFromWikipedia
 27 gobblin.runtime.JobException: Failed to run job PullFromWikipedia
 28     at gobblin.scheduler.JobScheduler.runJob(JobScheduler.java:352)
 29     at gobblin.scheduler.JobScheduler$NonScheduledJobRunner.run(JobScheduler.java:517)
 30     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 31     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 32     at java.lang.Thread.run(Thread.java:745)
 33 Caused by: java.lang.RuntimeException: Failed to create job launcher: java.lang.ClassNotFoundException: org.apache.gobblin.example.wikipedia.WikipediaSource
 34     at gobblin.runtime.JobLauncherFactory.newJobLauncher(JobLauncherFactory.java:120)
 35     at gobblin.runtime.JobLauncherFactory.newJobLauncher(JobLauncherFactory.java:85)
 36     at gobblin.runtime.JobLauncherFactory.newJobLauncher(JobLauncherFactory.java:65)
 37     at gobblin.scheduler.JobScheduler.runJob(JobScheduler.java:350)
 38     ... 4 more
 39 Caused by: java.lang.ClassNotFoundException: org.apache.gobblin.example.wikipedia.WikipediaSource
 40     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
 41     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
 42     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
 43     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

wikipedia.pull是从github复制的:

代码语言:javascript
复制
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

job.name=PullFromWikipedia
job.group=Wikipedia
job.description=A getting started example for Gobblin

source.class=org.apache.gobblin.example.wikipedia.WikipediaSource
source.page.titles=LinkedIn,Wikipedia:Sandbox
source.revisions.cnt=5

wikipedia.api.rooturl=https://en.wikipedia.org/w/api.php
wikipedia.avro.schema={"namespace": "example.wikipedia.avro","type": "record","name": "WikipediaArticle","fields": [{"name": "revid", "type": ["double", "null"]},{"name": "pageid", "type": ["double", "null"]},{"name": "title", "type": ["string", "null"]},{"name": "user", "type": ["string", "null"]},{"name": "anon", "type": ["string", "null"]},{"name": "userid",  "type": ["double", "null"]},{"name": "timestamp", "type": ["string", "null"]},{"name": "size",  "type": ["double", "null"]},{"name": "contentformat",  "type": ["string", "null"]},{"name": "contentmodel",  "type": ["string", "null"]},{"name": "content", "type": ["string", "null"]}]}
gobblin.wikipediaSource.maxRevisionsPerPage=10

converter.classes=org.apache.gobblin.example.wikipedia.WikipediaConverter

extract.namespace=org.apache.gobblin.example.wikipedia

writer.destination.type=HDFS
writer.output.format=AVRO
writer.partitioner.class=org.apache.gobblin.example.wikipedia.WikipediaPartitioner

data.publisher.type=org.apache.gobblin.publisher.BaseDataPublisher

EN

回答 2

Stack Overflow用户

发布于 2018-02-12 06:24:14

您需要将前缀org.apache从wikipedia.pull.Run中的所有定义中删除--它将再次工作。

实际上,如果您解压缩lib目录中的goblin-exam-0.9.0-642-g13a21ad.jar,导航到例/wikipedia,您可以在那里找到这些类。如果解压缩其中的一个,请注意包中不包含org.apache。包装gobblin.example.wikipedia;

票数 2
EN

Stack Overflow用户

发布于 2018-04-30 20:23:17

实际上,如果您解压缩lib目录中的goblin-exam-0.9.0-642-g13a21ad.jar,导航到例/wikipedia,您可以在那里找到这些类。如果解压缩其中的一个,请注意包中不包含org.apache。包装gobblin.example.wikipedia;

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46806672

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档