Presto 0.227版本源码编译

1. 环境准备

(1)Win10
(2)JDK(要求1.8.151及以上)
(3)Maven(要求3.3.9及以上)

2. 问题出现的原因及解决方法

(1)Error: java: RegexpMultiline: Line contains carriage return
原因:Presto会对代码规范进行严格的检查,maven-checkstyle-plugin检查失败就会报错

解决方法:在presto-root模块的pom.xml中properties部分添加以下内容:
<air.check.skip-extended>true</air.check.skip-extended>
并且注释掉
<air.checkstyle.config-file>src/checkstyle/presto-checks.xml</air.checkstyle.config-file>

(2)Failed to execute goal io.takari.maven.plugins:presto-maven-plugin:0.1.12:generate-service-descriptor (default-generate-service-descriptor) on project presto-jmx: Execution default-generate-service-descriptor of goal io.takari.maven.plugins:presto-maven-plugin:0.1.12:generate-service-descriptor
原因:Presto Github上说明了它支持Linux / Mac 编译,在Windows上编译需要去掉一部分内容

解决方法:在presto-docs模块中注释掉以下内容:

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>validate-reserved</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>com.facebook.presto.sql.ReservedIdentifiers</mainClass>
                            <arguments>
                                <argument>validateDocs</argument>
                                <argument>${project.basedir}/src/main/sphinx/language/reserved.rst</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>validate-thrift-idl</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>diff</executable>
                            <arguments>
                                <argument>-b</argument>
                                <argument>-c</argument>
                                <argument>${project.basedir}/src/main/sphinx/include/PrestoThriftService.thrift</argument>
                                <argument>${project.build.directory}/PrestoThriftService.thrift</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <includeProjectDependencies>false</includeProjectDependencies>
                    <includePluginDependencies>true</includePluginDependencies>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.facebook.presto</groupId>
                        <artifactId>presto-parser</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

(3)IDEA报错Could not reserve enough space for xxxxKB object heap
原因:IDEA堆内存分配不够

解决方法:打开IDEA安装目录下bin中的idea.exe.vmoptions和idea64.exe.vmoptions,修改Xmx和Xms为1024m

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值