小编use*_*447的帖子

在Windows中启动Confluent Schema Registry

我有windows环境和我自己的一套kafka和zookeeper运行.为了使用自定义对象,我开始使用Avro.但我需要启动注册表.下载了Confluent平台并运行了这个:

$ ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties
/c/Confluent/confluent-3.0.0-2.11/confluent-3.0.0/bin/schema-registry-run-class: line 103: C:\Program: No such file or directory
Run Code Online (Sandbox Code Playgroud)

然后我在安装页面上看到了这个:

"Confluent目前不支持Windows.Windows用户可以下载并使用zip和tar档案,但必须直接运行jar文件,而不是使用bin /目录中的包装脚本."

我想知道如何在Windows环境中启动融合模式注册表?

查看脚本的内容,很难解读.

谢谢

avro apache-kafka confluence-rest-api kafka-producer-api confluent

9
推荐指数
2
解决办法
5951
查看次数

如何在Hibernate标准中编写NOT IN查询?

这是我试图在Criteria中编写的查询:

    SELECT * FROM abc 
    WHERE NOT PartType IN ('0','4','5','6','7','a','b','c') 
Run Code Online (Sandbox Code Playgroud)

以上是iBatis.

所以这是表的hbm.xml

  <class name="Parts" table="SomeDb..Parts">
        <id name="recordNumber" column="Recnum" />
        <property name="partNumber" column="Partnum" />
        <property name="sectionNumber" column="Secnum" />
        <property name="articleNumber" column="Articlenum"/>
        <property name="headerNumber" column="Headernum"/>
        <property name="partType" column="PartType"/>
        <property name="code" column="Code"/>
  </class>
Run Code Online (Sandbox Code Playgroud)

partType是nvarchar,SQL Server数据库中的长度为1.我试图选择没有任何"0","4","5","6","7","a","b","c"的部分类型的记录.希望我已经回答了你的问题.谢谢

hibernate criteria

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

使用Selenium Webdriver选择PrimeFaces单选按钮

我正在尝试编写Selenium测试来选择一个单选按钮.以下是'view Source'中的html.

<table id="surveyForm:surveyUrlType" class="ui-selectoneradio ui-widget" style="width:100%;margin-top:10px;margin-bottom: 10px;">
    <tbody>
    <tr>
        <td>
            <div class="ui-radiobutton ui-widget">
                <div class="ui-helper-hidden-accessible">
                    <input id="surveyForm:surveyUrlType:0" name="surveyForm:surveyUrlType" type="radio" value="TYPED" checked="checked" onchange="com.ssi.feasibility.surveyView.showSurveyType(this);">
                </div>
                <div class="ui-radiobutton-box ui-widget ui-corner-all ui-state-default ui-state-active">
                    <span class="ui-radiobutton-icon ui-icon ui-icon-bullet"></span>
                </div>
            </div>
        </td>
        <td><label for="surveyForm:surveyUrlType:0">Enter Survey URL</label></td>
        <td>
            <div class="ui-radiobutton ui-widget">
                <div class="ui-helper-hidden-accessible">
                    <input id="surveyForm:surveyUrlType:1" name="surveyForm:surveyUrlType" type="radio" value="FILE" onchange="com.ssi.feasibility.surveyView.showSurveyType(this);">
                </div>
                <div class="ui-radiobutton-box ui-widget ui-corner-all ui-state-default">
                    <span class="ui-radiobutton-icon"></span>
                </div>
            </div>
        </td>
        <td><label for="surveyForm:surveyUrlType:1">Upload Survey URLs</label></td>
    </tr>
    </tbody>
</table>
Run Code Online (Sandbox Code Playgroud)

我想选择"上传调查网址"单选按钮.

我尝试了几种不同的方法来选择单选按钮.以下是一些:

        $("#surveyForm\\surveyUrlType").click();

        This gives me the error : …
Run Code Online (Sandbox Code Playgroud)

java selenium selenium-webdriver

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

获取oracle'中的物化视图日志列表

我想获得Oracle中物化视图日志的列表.我怎样才能做到这一点?我以为这会给我一个清单:

 select * from USER_BASE_TABLE_MVIEWS;
Run Code Online (Sandbox Code Playgroud)

删除实例化视图日志并使用与此类似的脚本重新创建时:

 CREATE MATERIALIZED VIEW LOG ON "XXX"."STATUSES_AUD"
 PCTFREE 10 PCTUSED 30 INITRANS 1 MAXTRANS 255 LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 ....
Run Code Online (Sandbox Code Playgroud)

运行此查询时,它不会显示:

select * from USER_BASE_TABLE_MVIEWS;
Run Code Online (Sandbox Code Playgroud)

有任何想法吗 ?

materialized-views oracle11g

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

如何在 .proto 中传入 json 作为有效负载

根据以下页面,我应该能够 在“JSON 映射”下发送 json 有效负载:https : //developers.google.com/protocol-buffers/docs/proto3

我想将 json 负载作为消息的一部分发送,我有以下 .proto 文件:

message EventsRequest{
    message RequestElement {
        struct payload = 1;
    }
    string customerId = 1;
    repeated RequestElement jsonPayload = 2;
}


message EventsResponse {
    int32 status = 1;
    string rawResponseData = 2;
    struct responseData = 3;
}
Run Code Online (Sandbox Code Playgroud)

但是编译它给了我以下错误:

[INFO] Compiling 1 proto file(s) to C:\workspace\...\target\generated-sources\protobuf\java
[ERROR] PROTOC FAILED: msg_service.proto:21:9: "struct" is not defined.
msg_service.proto:34:5: "struct" is not defined.

[ERROR] C:\workspace\...\src\main\proto\msg_service.proto [0:0]: msg_service.proto:21:9: "struct" is not defined.
msg_service.proto:34:5: …
Run Code Online (Sandbox Code Playgroud)

protocol-buffers grpc proto3 grpc-java

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

为什么 kafka 消费者数百次消费相同的消息?

我从日志中看到 665 次消耗了完全相同的消息。为什么会发生这种情况?

我也在日志中看到了这一点

Commit cannot be completed since the group has already rebalanced and assigned the partitions to another member. 
This means that the time between subsequent calls to poll() was longer than the configured session.timeout.ms, which typically implies 
that the poll loop is spending too much time message processing. You can address this either by increasing the session 
timeout or by reducing the maximum size of batches returned in poll() with max.poll.records.
Run Code Online (Sandbox Code Playgroud)

消费者属性

group.id=someGroupId
bootstrap.servers=kafka:9092
enable.auto.commit=false
key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
value.deserializer=org.apache.kafka.common.serialization.StringDeserializer …
Run Code Online (Sandbox Code Playgroud)

apache-kafka

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

org.codehaus.jackson.map.JsonMappingException:无限递归(StackOverflowError)

我正在尝试一些非常基本的Web服务.每当我尝试返回Prtnr对象时,我都会收到此异常.

Uncaught exception thrown in one of the service methods of the servlet: spitter. Exception thrown : 
org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError) 
(through reference chain: org.hibernate.collection.PersistentSet[0]->org.abc.dvo.PrtnrGeoInfo["id"]->org.abc.dvo.PrtnrGeoInfoId["partner"]->
org.abc.dvo.Prtnr["prtnrGeoInfos"]->org.hibernate.collection.PersistentSet[0]->org.abc.dvo.PrtnrGeoInfo["id"]->org.abc.dvo.PrtnrGeoInfoId["partner"]->
org.abc.dvo.Prtnr["prtnrGeoInfos"]->org.hibernate.collection.PersistentSet[0]->org.abc.dvo.PrtnrGeoInfo["id"]->org.abc.dvo.PrtnrGeoInfoId["partner"]->
org.abc.dvo.Prtnr["prtnrGeoInfos"]->org.hibernate.collection.PersistentSet[0]->org.abc.dvo.PrtnrGeoInfo["id"]->org.abc.dvo.PrtnrGeoInfoId["partner"]->
...
    at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:164)
    at org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:112)
    at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:446)
    at org.codehaus.jackson.map.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:150)
    ...
Run Code Online (Sandbox Code Playgroud)

Prtnr课程是:

public class Prtnr implements Cloneable, java.io.Serializable {

    private static final long serialVersionUID = 201207021420600052L;
    private Integer prtnrId;
    private String creatUserId;
    private Date creatTs;
    private String updtUserId;
    private Date updtTs;
    private String prtnrNm;
    private Integer cncilNum;
    private Character prtnrTypCd;
    private Set<PrtnrGeoInfo> prtnrGeoInfos …
Run Code Online (Sandbox Code Playgroud)

java web-services hibernate

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

语句上的Cassandra .setFetchSize()不受尊重

我想在UI上实现分页,所以我像这样设置fetchSize:

boundStatement.setFetchSize(20)
Run Code Online (Sandbox Code Playgroud)

但是setFetchSize()不受尊重.我的表目前有400行,检索到所有400行.当我使用时检索下一组行

rs.getExecutionInfo().getPagingState();
Run Code Online (Sandbox Code Playgroud)

然后检索接下来的380行.因此,正确设置和检索分页状态,但为什么驱动程序从表中检索所有400行,如何避免这种情况或仅检索400

部分代码:

....
....

// "SELECT * FROM abc.sometable"
BoundStatement boundStatement = pStmt.bind();
boundStatement.setFetchSize(20);

if (pagingState != null) {
  boundStatement.setPagingState(PagingState.fromString(pagingState));
}
ResultSet rs = session.execute(boundStatement);
PagingState nextPage = rs.getExecutionInfo().getPagingState();
int remaining = rs.getAvailableWithoutFetching();
List<?> list = new ArrayList<>();
for (Row row : rs) {
  list.add(getValidObjectFromRow(row));
}
 ....
Run Code Online (Sandbox Code Playgroud)

Cassandra版本 - 3.7和cassandra驱动程序版本 - 3.1.0

谢谢!

java cassandra datastax-java-driver

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