Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storm集群环境执行springboot项目的方法 #8

Open
JeniTurtle opened this issue Dec 3, 2018 · 5 comments
Open

storm集群环境执行springboot项目的方法 #8

JeniTurtle opened this issue Dec 3, 2018 · 5 comments
Labels
good first issue Good for newcomers

Comments

@JeniTurtle
Copy link

storm jar org.springframework.boot.loader.JarLauncher topologyName

这里把main class的路径包名换成springboot的。

@xuwujing xuwujing added the good first issue Good for newcomers label Dec 4, 2018
@l06066hb
Copy link

l06066hb commented Feb 15, 2019

请问下这种方式打包提交集群遇到过找不到spout和bolt的情况么

@BerserkGuts
Copy link

打包会报扩展实现的spout类不存在,ClassNotFoundException

@JeniTurtle
Copy link
Author

@BerserkGuts 你是用maven构建的吗

这是我构建插件的配置



org.apache.maven.plugins
maven-compiler-plugin

${java.version}
${java.version}
UTF-8

		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-jar-plugin</artifactId>
			<configuration>
				<!--<excludes>-->
					<!--<exclude>*.properties</exclude>-->
					<!--<exclude>*.yml</exclude>-->
				<!--</excludes>-->
				<archive>
					<manifest>
						<!-- 为依赖包添加路径, 这些路径会写在MANIFEST文件的Class-Path下 -->
						<mainClass>com.jouryu.Application</mainClass>
						<!-- 因为把所有的lib都放到storm/extlib目录下了, storm执行的时候默认会设置classpath -->
						<addClasspath>false</addClasspath>
						<classpathPrefix>/usr/hdp/2.6.4.0-91/storm/extlib/</classpathPrefix>
						<!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 -->
						<useUniqueVersions>false</useUniqueVersions>
					</manifest>
					<!--<manifestEntries>-->
						<!--<Class-Path>/home/jouryu/service/jouryuStorm/resources/</Class-Path>-->
					<!--</manifestEntries>-->
				</archive>
			</configuration>
		</plugin>

		<plugin>
			<artifactId>maven-assembly-plugin</artifactId>
			<configuration>
				<!-- not append assembly id in release file name -->
				<appendAssemblyId>false</appendAssemblyId>
				<descriptors>
					<descriptor>src/main/assembly/depolyment.xml</descriptor>
				</descriptors>
			</configuration>
			<executions>
				<execution>
					<id>dist</id>
					<phase>package</phase>
					<goals>
						<goal>single</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
</build>

@BerserkGuts
Copy link

@TomorrowCat 能给下assembly的具体配置嘛?多谢了!

@JeniTurtle
Copy link
Author

JeniTurtle commented Mar 26, 2019

@BerserkGuts
`dist

zip

true


${project.build.directory}/lib
lib

/



${project.build.directory}
.

.jar


-sources.jar



${project.build.directory}/classes
bin

*.sh

0744
unix


${project.build.directory}/classes
bin

cron/**

0744
unix

    <fileSet>
        <directory>${project.basedir}/conf</directory>
        <outputDirectory>conf</outputDirectory>
        <includes>
            <include>**/**</include>
        </includes>
    </fileSet>

    <fileSet>
        <directory>${project.build.directory}/classes</directory>
        <outputDirectory>conf</outputDirectory>
        <includes>
            <include>*.properties</include>
            <include>*.xml</include>
            <include>*.der</include>
        </includes>
        <lineEnding>unix</lineEnding>
    </fileSet>

    <fileSet>
        <directory>${project.basedir}/config</directory>
        <outputDirectory>config</outputDirectory>
        <includes>
            <include>**/**</include>
        </includes>
    </fileSet>

    <fileSet>
        <directory>${project.build.directory}/classes</directory>
        <outputDirectory>config</outputDirectory>
        <includes>
            <include>*.properties</include>
            <include>*.xml</include>
            <include>*.der</include>
        </includes>
        <lineEnding>unix</lineEnding>
    </fileSet>

</fileSets>`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants