Skip to content

Instantly share code, notes, and snippets.

View freeznet's full-sized avatar
:bowtie:
🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡

Rui Fu freeznet

:bowtie:
🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡🏡
  • StreamNative
  • Beijing, China
View GitHub Profile
@freeznet
freeznet / StockMsg.proto
Created March 19, 2022 14:33
protobuf_native producer
syntax = "proto3";
package proto;
option java_package = "org.examples";
option java_outer_classname = "StockProtoMessage";
message Stock {
int32 entryId = 1;
string symbol = 2;
double sharePrice = 3;
01:50:40.736 [Test worker] ERROR ?? [confluentinc/cp-kafka:latest] - Log output from the failed container:
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
[2021-12-12 01:49:42,945] INFO Reading configuration from: zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2021-12-12 01:49:42,951] WARN zookeeper.properties is relative. Prepend ./ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
apiVersion: compute.functionmesh.io/v1alpha1
kind: Sink
metadata:
name: cloud-storage-sink
namespace: pulsar
spec:
autoAck: true
className: org.apache.pulsar.io.jcloud.sink.CloudStorageGenericRecordSink
cleanupSubscription: true
clusterName: pulsar
@freeznet
freeznet / consumer.java
Created November 18, 2021 09:01
test AUTO_CONSUME
package org.examples;
import org.apache.pulsar.client.api.Consumer;
import org.apache.pulsar.client.api.Message;
import org.apache.pulsar.client.api.PulsarClient;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.api.schema.GenericRecord;
public class JsonByteArrayConsumer {
public static void main(String[] args) throws Exception {
@freeznet
freeznet / pulsar-mini.yml
Created July 20, 2021 01:20
reproduce folder race condition
#
# 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
@freeznet
freeznet / a.log
Created June 24, 2021 02:02
data race
==================
WARNING: DATA RACE
Write at 0x00c00110ab20 by goroutine 348:
runtime.slicecopy()
/usr/local/go/src/runtime/slice.go:247 +0x0
github.com/apache/pulsar-client-go/pulsar/internal/pulsar_proto.(*MessageMetadata).MarshalToSizedBuffer()
/go/pkg/mod/github.com/apache/pulsar-client-go@v0.4.1-0.20210617060310-579984eb5bd5/pulsar/internal/pulsar_proto/PulsarApi.pb.go:7182 +0x9c4
github.com/apache/pulsar-client-go/pulsar/internal.serializeBatch()
/go/pkg/mod/github.com/apache/pulsar-client-go@v0.4.1-0.20210617060310-579984eb5bd5/pulsar/internal/commands.go:250 +0x329
github.com/apache/pulsar-client-go/pulsar/internal.(*batchContainer).Flush()
@freeznet
freeznet / connector-mesh.yaml
Created April 9, 2021 05:48
connector-mesh.yaml
apiVersion: cloud.streamnative.io/v1alpha1
kind: FunctionMesh
metadata:
name: connector-mesh-demo
spec:
sinks:
- name: data-generator-sink
image: freeznet/pulsar-io-data-generator:2.7.1
className: org.apache.pulsar.io.datagenerator.DataGeneratorPrintSink
sourceType: "org.apache.pulsar.io.datagenerator.Person"
@freeznet
freeznet / values.yaml
Last active March 2, 2021 04:04
sample cluster values for go client #472
#
# 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
13:47:37.370 [LIFECYCLE] [org.gradle.internal.operations.DefaultBuildOperationExecutor] > Task :tests:pulsar:functions:test
13:47:37.370 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :tests:pulsar:functions:test' started
13:47:37.375 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Resolve dependencies of :tests:pulsar:functions:testRuntimeClasspath' started
13:47:37.375 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver] Resolving configuration ':tests:pulsar:functions:testRuntimeClasspath'
13:47:37.375 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.ResolvedArtifactCaches] Reusing in-memory cache for repo 'MavenLocal' [c80d084a8f52dfef2a0c43a91a8acbfe].
13:47:37.376 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.modulecache.ResolvedArtifactCaches] Reusing in-memory cache for repo 'BintrayJCenter' [1dd858de07b774d6be9d3e38c5646087].
13:47:37.376 [DE
effects: {
*fetch({ payload }, { put }) {
bla bla bla
yield bla bla bla
},
*bulkFetch({ payload }, { all, put }) {
const quests = payload.map(v => {
return put({
type: 'fetch',
payload: v,