我已经开始使用storm,所以我使用本教程创建了简单的拓扑
当我运行我的拓扑LocalCluster
并且一切看起来都很好时,我的问题是我没有得到元组的确认,这意味着我的鲸鱼喷水ack
器从未被调用过.
我的代码在下面 - 你知道为什么ack
不被调用?
所以我的拓扑看起来像这样
public StormTopology build() {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(HelloWorldSpout.class.getSimpleName(),
helloWorldSpout, spoutParallelism);
HelloWorldBolt bolt = new HelloWorldBolt();
builder.setBolt(HelloWorldBolt.class.getSimpleName(),
bolt, boltParallelism)
.shuffleGrouping(HelloWorldSpout.class.getSimpleName());
}
Run Code Online (Sandbox Code Playgroud)
我的喷口看起来像这样
public class HelloWorldSpout extends BaseRichSpout implements ISpout {
private SpoutOutputCollector collector;
public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(new Fields("int"));
}
public void open(Map conf, TopologyContext context,
SpoutOutputCollector collector) {
this.collector = collector;
}
private static Boolean flag = false;
public void nextTuple() {
Utils.sleep(5000); …
Run Code Online (Sandbox Code Playgroud) 如何在我的应用程序未运行时处理推送通知我正在开发ios3.请帮助
在所附的屏幕截图中,我要单击“新建浏览器窗口”。我想关闭浏览器窗口,然后单击“新消息”窗口。我关闭了浏览器窗口。但是我得到了例外
org.openqa.selenium.NoSuchWindowException: no such window: target window already closed
Run Code Online (Sandbox Code Playgroud)
屏幕截图
下面是详细信息 屏幕截图
下面是代码
@Test
public void testing()
{
driver.manage().window().maximize();
driver.get("http://www.seleniumframework.com/Practiceform/");
driver.findElement(By.id("button1")).click();
Set<String> handle=driver.getWindowHandles();
for(String handles:handle){
try{
String text=driver.switchTo().window(handles).getPageSource();
if(text.contains("Agile Testing and ATDD Automation")){
System.out.println("Text found");
driver.close();
break;
}
}catch(Exception e){}
}
driver.switchTo().defaultContent();
driver.findElement(By.xpath("//button[contains(text(),'New Message Window')]")).click();
driver.quit();
Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个基本的客户端/服务器程序,但是当我启动 TcpListener 时,它给了我SocketException:The requested address is not valid in its context.
实际上有一个返回我的公共 IP 的方法,并且它与 ipconfig 结果匹配,因此下面的 IP 地址字符串不能是问题。当然,出于安全原因,下面显示的 IP 不是我的真实 IP。我打开了下面的端口供一般使用。
无论如何,Not valid in context
很模糊,所以我不确定这意味着什么。
这是我的代码(对于 TcpListener):
ServerIn = new TcpListener(IpAddress.Parse("100.100.100.100"), 8000);
ServerIn.Start();
Run Code Online (Sandbox Code Playgroud)
提前致谢。