精华内容
下载资源
问答
  • URISyntaxException

    2019-07-26 19:31:59
    java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\xxx\xxx 因为这个是URI和普通的path 有区别,看下源码,意思是要基于某种协议 一般是file 或者http,学习大数据的时候有 hdfs:///...

    java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\xxx\xxx

    因为这个是URI和普通的path 有区别,看下源码,意思是要基于某种协议

    一般是file 或者http,学习大数据的时候有 hdfs:///   spark:/// 协议

    new URI("file:///E:/code/input/join/pd.txt")
    /**
     * Constructs a URI by parsing the given string.
     *
     * <p> This constructor parses the given string exactly as specified by the
     * grammar in <a
     * href="http://www.ietf.org/rfc/rfc2396.txt">RFC&nbsp;2396</a>,
     * Appendix&nbsp;A, <b><i>except for the following deviations:</i></b> </p>
     *
     * <ul>
     *
     *   <li><p> An empty authority component is permitted as long as it is
     *   followed by a non-empty path, a query component, or a fragment
     *   component.  This allows the parsing of URIs such as
     *   {@code "file:///foo/bar"}, which seems to be the intent of
     *   RFC&nbsp;2396 although the grammar does not permit it.  If the
     *   authority component is empty then the user-information, host, and port
     *   components are undefined. </p></li>
     *
     *   <li><p> Empty relative paths are permitted; this seems to be the
     *   intent of RFC&nbsp;2396 although the grammar does not permit it.  The
     *   primary consequence of this deviation is that a standalone fragment
     *   such as {@code "#foo"} parses as a relative URI with an empty path
     *   and the given fragment, and can be usefully <a
     *   href="#resolve-frag">resolved</a> against a base URI.
     *
     *   <li><p> IPv4 addresses in host components are parsed rigorously, as
     *   specified by <a
     *   href="http://www.ietf.org/rfc/rfc2732.txt">RFC&nbsp;2732</a>: Each
     *   element of a dotted-quad address must contain no more than three
     *   decimal digits.  Each element is further constrained to have a value
     *   no greater than 255. </p></li>
     *
     *   <li> <p> Hostnames in host components that comprise only a single
     *   domain label are permitted to start with an <i>alphanum</i>
     *   character. This seems to be the intent of <a
     *   href="http://www.ietf.org/rfc/rfc2396.txt">RFC&nbsp;2396</a>
     *   section&nbsp;3.2.2 although the grammar does not permit it. The
     *   consequence of this deviation is that the authority component of a
     *   hierarchical URI such as {@code s://123}, will parse as a server-based
     *   authority. </p></li>
     *
     *   <li><p> IPv6 addresses are permitted for the host component.  An IPv6
     *   address must be enclosed in square brackets ({@code '['} and
     *   {@code ']'}) as specified by <a
     *   href="http://www.ietf.org/rfc/rfc2732.txt">RFC&nbsp;2732</a>.  The
     *   IPv6 address itself must parse according to <a
     *   href="http://www.ietf.org/rfc/rfc2373.txt">RFC&nbsp;2373</a>.  IPv6
     *   addresses are further constrained to describe no more than sixteen
     *   bytes of address information, a constraint implicit in RFC&nbsp;2373
     *   but not expressible in the grammar. </p></li>
     *
     *   <li><p> Characters in the <i>other</i> category are permitted wherever
     *   RFC&nbsp;2396 permits <i>escaped</i> octets, that is, in the
     *   user-information, path, query, and fragment components, as well as in
     *   the authority component if the authority is registry-based.  This
     *   allows URIs to contain Unicode characters beyond those in the US-ASCII
     *   character set. </p></li>
     *
     * </ul>
     *
     * @param  str   The string to be parsed into a URI
     *
     * @throws  NullPointerException
     *          If {@code str} is {@code null}
     *
     * @throws  URISyntaxException
     *          If the given string violates RFC&nbsp;2396, as augmented
     *          by the above deviations
     */
    展开全文
  • 38 common frames omitted Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected authority at index 7: http:// at com.amazonaws.util.HttpUtils.toUri(HttpUtils....

    springboot项目,本地运行测试时没问题,打包部署到docker容器时报错,报错信息如下:

    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
    2021-04-06 10:02:40.084 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
    
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crawlResultController': Unsatisfied dependency expressed through field 'crawlResultService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'crawlResultService' defined in URL [jar:file:/app.jar!/BOOT-INF/classes!/com/jsc/osdp/service/CrawlResultService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jsc.osdp.service.CrawlResultService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected authority at index 7: http://
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:882) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar!/:2.2.6.RELEASE]
            at com.jsc.osdp.OsdpApplication.main(OsdpApplication.java:13) [classes!/:0.0.1-SNAPSHOT]
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
            at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [app.jar:0.0.1-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app.jar:0.0.1-SNAPSHOT]
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) [app.jar:0.0.1-SNAPSHOT]
            at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) [app.jar:0.0.1-SNAPSHOT]
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'crawlResultService' defined in URL [jar:file:/app.jar!/BOOT-INF/classes!/com/jsc/osdp/service/CrawlResultService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jsc.osdp.service.CrawlResultService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected authority at index 7: http://
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1290) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1210) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            ... 27 common frames omitted
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.jsc.osdp.service.CrawlResultService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected authority at index 7: http://
            at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1312) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            ... 38 common frames omitted
    Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Expected authority at index 7: http://
            at com.amazonaws.util.HttpUtils.toUri(HttpUtils.java:205) ~[aws-java-sdk-core-1.10.69.jar!/:na]
            at com.amazonaws.AmazonWebServiceClient.toURI(AmazonWebServiceClient.java:186) ~[aws-java-sdk-core-1.10.69.jar!/:na]
            at com.amazonaws.AmazonWebServiceClient.setEndpoint(AmazonWebServiceClient.java:176) ~[aws-java-sdk-core-1.10.69.jar!/:na]
            at com.amazonaws.services.s3.AmazonS3Client.setEndpoint(AmazonS3Client.java:474) ~[aws-java-sdk-s3-1.10.69.jar!/:na]
            at com.jsc.osdp.util.CephUtil.<init>(CephUtil.java:38) ~[classes!/:0.0.1-SNAPSHOT]
            at com.jsc.osdp.service.CrawlResultService.<init>(CrawlResultService.java:61) ~[classes!/:0.0.1-SNAPSHOT]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_201]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_201]
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_201]
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_201]
            at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
            ... 40 common frames omitted
    Caused by: java.net.URISyntaxException: Expected authority at index 7: http://
            at java.net.URI$Parser.fail(URI.java:2848) ~[na:1.8.0_201]
            at java.net.URI$Parser.failExpecting(URI.java:2854) ~[na:1.8.0_201]
            at java.net.URI$Parser.parseHierarchical(URI.java:3102) ~[na:1.8.0_201]
            at java.net.URI$Parser.parse(URI.java:3053) ~[na:1.8.0_201]
            at java.net.URI.<init>(URI.java:588) ~[na:1.8.0_201]
            at com.amazonaws.util.HttpUtils.toUri(HttpUtils.java:203) ~[aws-java-sdk-core-1.10.69.jar!/:na]
            ... 50 common frames omitted
    

    网上搜索到很多原因,大部分是配置文件中的链接后面有空格啥的,在我这里不适用。最终定位到的原因是在类中进行实例化的位置不对。

    错误的写法:不能在类中直接进行实例化

    正确的写法,应该在方法中进行实例化:

    展开全文
  • hudi分区列乱码问题 :java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 46: hdfs://linux01:9000/hudi/insertHDFS/ggggggg/ä¸å½/eb4ddae6-9841-469b-9fed-c...

    在做hudi测试的时候 发现 如果hudi的分区列是 中文字符的 就会报  先下面的错误 hdfs://linux01:9000/hudi/insertHDFS/ggggggg/ä¸å½/eb4ddae6-9841-469b-9fed-c2375f13d616-0_2-21-28_20210122113859.parquet   

    在gggggggg目录下面报乱码这个是我的分区列    ä¸å½  是中文字符报这个问题  , 以后用英文吧  或者其他的 实在不行上拼音 嘎嘎 

    16241 [qtp1096084691-76] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - #files found in partition (春秋) =2, Time taken =2
    16241 [qtp1096084691-74] INFO  org.apache.hudi.common.table.view.HoodieTableFileSystemView  - Adding file-groups for partition :default, #FileGroups=1
    16241 [qtp1096084691-74] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - addFilesToView: NumFiles=3, FileGroupsCreationTime=1, StoreTimeTaken=0
    16241 [qtp1096084691-74] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - Time to load partition (default) =4
    16241 [qtp1096084691-76] INFO  org.apache.hudi.common.table.view.HoodieTableFileSystemView  - Adding file-groups for partition :春秋, #FileGroups=1
    16241 [qtp1096084691-76] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - addFilesToView: NumFiles=2, FileGroupsCreationTime=0, StoreTimeTaken=0
    16241 [qtp1096084691-76] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - Time to load partition (春秋) =4
    16242 [qtp1096084691-70] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - Pending Compaction instant for (FileSlice {fileGroupId=HoodieFileGroupId{partitionPath='三国', fileId='eb4ddae6-9841-469b-9fed-c2375f13d616-0'}, baseCommitTime=20210122113859, baseFile='HoodieDataFile{fullPath=hdfs://linux01:9000/hudi/insertHDFS/ggggggg/三国/eb4ddae6-9841-469b-9fed-c2375f13d616-0_2-21-28_20210122113859.parquet, fileLen=435686}', logFiles='[]'}) is :Option{val=null}
    16242 [qtp1096084691-74] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - Pending Compaction instant for (FileSlice {fileGroupId=HoodieFileGroupId{partitionPath='default', fileId='7570a823-0c9c-4c9c-9ac1-4b7049bda06a-0'}, baseCommitTime=20210122113859, baseFile='HoodieDataFile{fullPath=hdfs://linux01:9000/hudi/insertHDFS/ggggggg/default/7570a823-0c9c-4c9c-9ac1-4b7049bda06a-0_0-21-26_20210122113859.parquet, fileLen=432566}', logFiles='[]'}) is :Option{val=null}
    16242 [qtp1096084691-76] INFO  org.apache.hudi.common.table.view.AbstractTableFileSystemView  - Pending Compaction instant for (FileSlice {fileGroupId=HoodieFileGroupId{partitionPath='春秋', fileId='38955f0a-4891-412d-aa3a-ff83cb85f81e-0'}, baseCommitTime=20210122113859, baseFile='HoodieDataFile{fullPath=hdfs://linux01:9000/hudi/insertHDFS/ggggggg/春秋/38955f0a-4891-412d-aa3a-ff83cb85f81e-0_1-21-27_20210122113859.parquet, fileLen=435503}', logFiles='[]'}) is :Option{val=null}
    16243 [qtp1096084691-76] INFO  org.apache.hudi.timeline.service.FileSystemViewHandler  - TimeTakenMillis[Total=6, Refresh=0, handle=6, Check=0], Success=true, Query=partition=%E6%98%A5%E7%A7%8B&basepath=%2Fhudi%2FinsertHDFS%2Fggggggg&lastinstantts=20210122113859&timelinehash=1dd7dcd13f88921e2bf8ec650caa2f6f9c7c9b224d72d86a2e0a453368b72d9e, Host=windows:51997, synced=false
    16243 [qtp1096084691-74] INFO  org.apache.hudi.timeline.service.FileSystemViewHandler  - TimeTakenMillis[Total=7, Refresh=1, handle=6, Check=0], Success=true, Query=partition=default&basepath=%2Fhudi%2FinsertHDFS%2Fggggggg&lastinstantts=20210122113859&timelinehash=1dd7dcd13f88921e2bf8ec650caa2f6f9c7c9b224d72d86a2e0a453368b72d9e, Host=windows:51997, synced=false
    16243 [qtp1096084691-70] INFO  org.apache.hudi.timeline.service.FileSystemViewHandler  - TimeTakenMillis[Total=7, Refresh=1, handle=6, Check=0], Success=true, Query=partition=%E4%B8%89%E5%9B%BD&basepath=%2Fhudi%2FinsertHDFS%2Fggggggg&lastinstantts=20210122113859&timelinehash=1dd7dcd13f88921e2bf8ec650caa2f6f9c7c9b224d72d86a2e0a453368b72d9e, Host=windows:51997, synced=false
    16274 [Executor task launch worker for task 32] ERROR org.apache.spark.executor.Executor  - Exception in task 0.0 in stage 28.0 (TID 32)
    java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 46: hdfs://linux01:9000/hudi/insertHDFS/ggggggg/ä¸å½/eb4ddae6-9841-469b-9fed-c2375f13d616-0_2-21-28_20210122113859.parquet
        at org.apache.hudi.common.table.timeline.dto.FilePathDTO.toPath(FilePathDTO.java:54)
        at org.apache.hudi.common.table.timeline.dto.FileStatusDTO.toFileStatus(FileStatusDTO.java:102)
        at org.apache.hudi.common.table.timeline.dto.BaseFileDTO.toHoodieBaseFile(BaseFileDTO.java:46)
        at org.apache.hudi.common.table.timeline.dto.FileSliceDTO.toFileSlice(FileSliceDTO.java:58)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at org.apache.hudi.table.compact.HoodieMergeOnReadTableCompactor.lambda$generateCompactionPlan$85ff16a$1(HoodieMergeOnReadTableCompactor.java:207)
        at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125)
        at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125)
        at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435)
        at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441)
        at scala.collection.Iterator$class.foreach(Iterator.scala:891)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
        at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
        at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:104)
        at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:48)
        at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
        at scala.collection.AbstractIterator.to(Iterator.scala:1334)
        at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:302)
        at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1334)
        at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:289)
        at scala.collection.AbstractIterator.toArray(Iterator.scala:1334)
        at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$15.apply(RDD.scala:990)
        at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$15.apply(RDD.scala:990)
        at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2101)
        at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2101)
        at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
        at org.apache.spark.scheduler.Task.run(Task.scala:123)
        at org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:408)
        at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)
        at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:414)
        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)
    Caused by: java.net.URISyntaxException: Illegal character in path at index 46: hdfs://linux01:9000/hudi/insertHDFS/ggggggg/ä¸å½/eb4ddae6-9841-469b-9fed-c2375f13d616-0_2-21-28_20210122113859.parquet
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.checkChars(URI.java:3021)
        at java.net.URI$Parser.parseHierarchical(URI.java:3105)
        at java.net.URI$Parser.parse(URI.java:3053)
        at java.net.URI.<init>(URI.java:588)
        at org.apache.hudi.common.table.timeline.dto.FilePathDTO.toPath(FilePathDTO.java:52)
        ... 38 more
    16274 [Executor task launch worker for task 33] ERROR org.apache.spark.executor.Executor  - Exception in task 1.0 in stage 28.0 (TID 33)
    java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 45: hdfs://linux01:9000/hudi/insertHDFS/ggggggg/æ¥ç§/38955f0a-4891-412d-aa3a-ff83cb85f81e-0_1-21-27_20210122113859.parquet
        at org.apache.hudi.common.table.timeline.dto.FilePathDTO.toPath(FilePathDTO.java:54)
        at org.apache.hudi.common.table.timeline.dto.FileStatusDTO.toFileStatus(FileStatusDTO.java:102)
        at org.apache.hudi.common.table.timeline.dto.BaseFileDTO.toHoodieBaseFile(BaseFileDTO.java:46)
        at org.apache.hudi.common.table.timeline.dto.FileSliceDTO.toFileSlice(FileSliceDTO.java:58)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at org.apache.hudi.table.compact.HoodieMergeOnReadTableCompactor.lambda$generateCompactionPlan$85ff16a$1(HoodieMergeOnReadTableCompactor.java:207)
        at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125)
        at org.apache.spark.api.java.JavaRDDLike$$anonfun$fn$1$1.apply(JavaRDDLike.scala:125)
        at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435)
        at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441)
        at scala.collection.Iterator$class.foreach(Iterator.scala:891)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1334)
        at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
        at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:104)
        at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:48)
        at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
        at scala.collection.AbstractIterator.to(Iterator.scala:1334)
        at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:302)
        at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1334)
        at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:289)
        at scala.collection.AbstractIterator.toArray(Iterator.scala:1334)
        at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$15.apply(RDD.scala:990)
        at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$15.apply(RDD.scala:990)
        at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2101)
        at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2101)
        at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
        at org.apache.spark.scheduler.Task.run(Task.scala:123)
        at org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:408)
        at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)
        at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:414)

    因为我的分区字段时中文。

    所以尽量避免中文字符作为hudi分区列  是在不行用拼音 总可以吧 !

     

     

     

     

     

    展开全文
  • 先上代码: Properties pro = PropertyUtil.getPropertiesInfo("xxx.properties"); String url = pro.getProperty("xxxxxxx");...java.net.URISyntaxException: Illegal character in query at in...

    先上代码:

    Properties pro = PropertyUtil.getPropertiesInfo("xxx.properties");
    String url = pro.getProperty("xxxxxxx");
    
    HttpPost httpPost = new HttpPost(url);
    

      自己在本地开发的时候,一直没有问题,上了测试环境后一直报错:

    java.net.URISyntaxException: Illegal character in query at index 65

    起初我在网上也查了一些这个问题,都说地址中涉及了特殊字符,如‘|’‘&’等。要通过new一个新的url的方式解决(具体不细说了,可自行搜索),我自己也按这种方式改了,
    但在执行返回代码的时候报错:

    Target host must not be null, or set in parameters

     

    HttpResponse response = client.execute(httpPost); 
    

     

      解决先前的问题,又遇到了新的问题,就像会不会解决问题的方式不对,果不其然,打开配置文件xxx.properties,详细查看一番,发现在配置的地址最后面多了一个空格,

    删除后,解决。

      最后,列几个特殊字符及十六进制值

               特殊含义                                               十六进制值 
    1.+ 表示空格(在 URL 中不能使用空格)              %20 
    2./ 分隔目录和子目录                                              %2F 
    3.? 分隔实际的 URL 和参数                                    %3F 
    4.% 指定特殊字符                                                   %25 
    5.# 表示书签                                                            %23 
    6.& URL 中指定的参数间的分隔符                          %26 

     

    展开全文
  • put: unexpected URISyntaxException 解决:将空格改为%20 hadoop fs -put "20180720_155245%20label.zip" /user/File/ HDFS路径不支持包含冒号,如果是空格,则使用%20代替 如果是含有冒号,也会报错。现在官方也...
  • 这个错误,第一时间很懵逼。因为是流程式生成的url,之前的都没错,只有这一个报错了。参考了一下其他博主的方法第一时间的想法是先做URLEncoder编码。发现还是没有效果。 正在上传…重新上传取消 ...
  • 记录flutter报错如下错误以及解决办法 FAILURE: Build failed with an exception. ... java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\flutter\\qy_trade\\qy_trade_fl
  • 192.168.20.167, executor 1): java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: D:%5Ctmp%5Chadoop%5CHamlet.txt at org.apache.hadoop.fs.Path.initialize...
  • copyFromLocal: unexpected URISyntaxException
  • 错误: 解决办法:http请求的编码勾选上就好了
  • Jmeter中java.net.URISyntaxException错误

    千次阅读 2019-09-28 05:50:25
    今天在做服务发布性能测试的时候,傻傻的犯了个错,没有对参数进行仔细的检查,直接从fiddler中copy到jmeter...java.net.URISyntaxException: Illegal character in query at index 222: http://xxx.xx.xx.24:9006/...
  • Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:D:/development/intellij_idea/workspace/SparkFaultBench/spark-warehouse ...
  • ​​​​hive启动时出现java.net.URISyntaxException异常,异常代码: Logging initialized using configuration in file:/export/servers/hive-2.3.6/conf/hive-log4j2.properties Async: true Exception in thread...
  • public static void main( String [] args ) throws URISyntaxException , UnsupportedEncodingException { String myQuery = "^IXIC"; URI uri = new URI( String.format( ...
  • 淘淘商城大广告页出现以下错误: ...java.net.URISyntaxException: Illegal character in path at index 1: ${REST_BASE_URL}${REST_INDEX_AD_URL} at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$P...
  • java.net.URISyntaxException: Malformed IPv6 address at index 8: http://[test.xdaili.cn:10003]/ at java.net.URI$Parser.fail(Unknown Source) at java.net.URI$Parser.parseIPv6Reference(Unknown Source) at ...
  • 添加链接描述
  • /hive-log4j2.properties Async: true Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:...
  • Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D a...
  • java.net.URISyntaxException: Illegal character in query at index 44下载 httpclient 源码 http://hc.apache.org/downloads.cgi然后修改 httpcomponents-client-4.3.6\httpclient\src\main\java\org\apache\...
  • java.net.URISyntaxException: 的错误解决

    千次阅读 2019-10-05 17:27:58
    java.net.URISyntaxException: Expected scheme-specific part at index 20: http 该问题的出现就是请求的url路径出现了问题,仔细查看自己的请求url是否争取 @RestController @RequestMapping...
  • 2017-10-30 17:44:55,166 | ERROR | Failed to start Apache ActiveMQ ([localhost, ID:IBP_DB_01-19065-1509356694925-0:1], java.net.URISyntaxException: Illegal character in hostname at index 8: ws://IBP_DB...
  • HDFS-put: unexpected URISyntaxException

    千次阅读 2018-08-02 10:28:00
    目的:将某zip上传到HDFS某目录 [hdfs@mr1 jars]$ hadoop fs -put "20180720_155245...put: unexpected URISyntaxException 解决:将空格改为%20 [hdfs@mr1 jars]$ hadoop fs -put "20180720_155245%20label.zip" ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 10,591
精华内容 4,236
关键字:

urisyntaxexception