小编rav*_*ram的帖子

流浪汉。您尝试添加的框不支持您请求的提供者

我使用创建了一个无业游民的盒子vagrant package,上传并释放了它。
然后,我vagrant init <username>/<box>创建了一个Vagrantfile。我什至将盒装版本附加到Vagrantfile。
接下来我做了vagrant up --provider virtualbox。这会尝试在本地获取框,然后在找不到框时出现错误:

The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Atlas, make sure the box is
released.
Run Code Online (Sandbox Code Playgroud)

我已经将virtualbox设置为提供程序,并且virtual box与我使用的其他box都可以正常工作。

vagrant

5
推荐指数
2
解决办法
4378
查看次数

使用 kafka 连接器运行 flink 时出现 NoClassDefFoundError

我正在尝试使用 flink 从 kafka 流式传输数据。我的代码编译没有错误,但在运行时出现以下错误:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: 
    org/apache/flink/streaming/util/serialization/DeserializationSchema
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.flink.streaming.util.serialization.DeserializationSchema
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more  
Run Code Online (Sandbox Code Playgroud)

我的POM依赖列表如下:

    <dependencies>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-java</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-streaming-core</artifactId>
            <version>0.9.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-clients</artifactId>
            <version>0.10.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-connector-kafka-0.9_2.11</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1</version> …
Run Code Online (Sandbox Code Playgroud)

java apache-flink flink-streaming

5
推荐指数
1
解决办法
2万
查看次数

Tippecanoe 生成的 pbf 存储在 s3 上并在 mapbox-gl 上可视化

我正在开发这个项目,我需要使用tippecanoe生成protobuf文件,将它们存储在s3存储桶上并使用mapbox-gl将其可视化。
我使用 -e 选项生成矢量切片以写入我选择的文件夹,并--no-tile-size-limit避免--no-tile-compression数据预期方式出现任何差异。然后我将所有这些文件上传到 s3 存储桶。然后,我尝试通过修改https://docs.mapbox.com/mapbox-gl-js/example/third-party/
上的代码来可视化这一点。我的代码是:

var map = new mapboxgl.Map({
    container: 'map',
    style: 'mapbox://styles/mapbox/light-v10',
    zoom: 12,
    center: [-77,38]
});
map.on('load', function() {
    map.addLayer({
        "id": "test",
        "type": "circle",
        "source": {
            "type": "vector",
            "tiles": ["<link_to_my_cloudfront>/{z}/{x}/{y}.pbf"],
            "maxzoom": 11
        },
        "source-layer": "trees",
        "paint": {
            "circle-radius": 3,
            "circle-color": "#000000",
            "circle-stroke-width": 1
        }
    }
});
Run Code Online (Sandbox Code Playgroud)

我可以从 Tippecanoe 生成的元数据文件中确认该 ID 与我这里的 ID 匹配。
问题是当我加载地图时。对 pbf 文件的请求的响应是 200,content-typeapplication/x-protobuf这些点没有显示在地图上。我是否使用了一些不正确的选项,或者只是不兼容。我很难相信是后者,因为 Tippecanoe 和 Mapbox-gl 都是由 Mapbox 开发的,并且众所周知它们非常强大。

mapbox-gl mapbox-gl-js tippecanoe

5
推荐指数
1
解决办法
1459
查看次数

Flink可以和Kotlin一起使用吗?

我有一个项目,需要实时传输数据。我已将流内数据写到kafka主题。现在,我需要读取此数据并进行处理。为此,我计划使用Flink。
我的困境是我不知道Java,Scala或Kotlin。我必须学习其中之一才能使用Flink,并且由于Kotlin是最新产品,所以我认为我应该学习这一点,但是它实际上与Flink兼容吗?
我对任何类型的数据流都是全新的,所以请原谅我的问题中的任何错误,如果我错了,一定可以纠正我。

scala bigdata kotlin apache-flink flink-streaming

4
推荐指数
1
解决办法
1111
查看次数

如何列出所有linux别名

我知道在 Linux 中我可以使用该alias命令来获取已定义别名的列表。我现在尝试通过 Go 代码执行相同的操作:

func ListAlias() error {
    out, err := exec.Command("alias").Output()
    if err != nil {
        fmt.Println(err)
        return err
    }
    fmt.Println(out)
    return nil
}
Run Code Online (Sandbox Code Playgroud)

但返回的所有内容是:

exec: "alias": executable file not found in $PATH
Run Code Online (Sandbox Code Playgroud)

我尝试寻找实际的二进制文件在哪里alias,但这也无济于事:

$whereis alias
alias:
Run Code Online (Sandbox Code Playgroud)

我考虑的替代方案是解析~/.bashrc文件以获取定义的别名列表,但我遇到过这种情况,其中bashrc列出了另一个custom_aliases.sh文件并且所有别名都列在那里。这就是为什么我尝试使用该alias命令列出所有别名。

linux alias go subshell

1
推荐指数
1
解决办法
328
查看次数