91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 12.3MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-26
  • 語言: 其他
  • 標簽: zookeeper??

資源簡介

Zookeeper 作為一個分布式的服務框架,主要用來解決分布式集群中應用系統的一致性問題,它能提供基于類似于文件系統的目錄節點樹方式的數據存儲, Zookeeper 作用主要是用來維護和監控存儲的數據的狀態變化,通過監控這些數據狀態的變化,從而達到基于數據的集群管理。

資源截圖

代碼片段和文件信息

package?org.apache.bookkeeper.benchmark;

/**
?*?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
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/

import?java.io.FileOutputStream;
import?java.sql.Connection;
import?java.sql.DriverManager;
import?java.sql.SQLException;
import?java.sql.Statement;
import?java.util.HashMap;

import?org.apache.bookkeeper.client.BookKeeper;
import?org.apache.bookkeeper.client.LedgerHandle;
import?org.apache.bookkeeper.client.QuorumEngine;
import?org.apache.log4j.Logger;


import?org.apache.zookeeper.KeeperException;

public?class?MySqlClient?{
static?Logger?LOG?=?Logger.getLogger(QuorumEngine.class);

BookKeeper?x;
LedgerHandle?lh;
Integer?entryId;
HashMap?map;

FileOutputStream?fStream;
FileOutputStream?fStreamLocal;
long?start?lastId;
Connection?con;
Statement?stmt;


public?MySqlClient(String?hostport?String?user?String?pass)?
throws?ClassNotFoundException?{
entryId?=?0;
map?=?new?HashMap();
Class.forName(“com.mysql.jdbc.Driver“);
//?database?is?named?“bookkeeper“
String?url?=?“jdbc:mysql://“?+?hostport?+?“/bookkeeper“;
try?{
con?=?DriverManager.getConnection(url?user?pass);
stmt?=?con.createStatement();
//?drop?table?and?recreate?it
stmt.execute(“DROP?TABLE?IF?EXISTS?data;“);
stmt.execute(“create?table?data(transaction_id?bigint?PRIMARY?KEY?AUTO_INCREMENT?content?TEXT);“);
LOG.info(“Database?initialization?terminated“);
}?catch?(SQLException?e)?{

//?TODO?Auto-generated?catch?block
e.printStackTrace();
}
}

public?void?closeHandle()?throws?KeeperException?InterruptedException?SQLException{
con.close();
}
/**
?*?First?parameter?is?an?integer?defining?the?length?of?the?message?
?*?Second?parameter?is?the?number?of?writes
?*?Third?parameter?is?host:port?
?*?Fourth?parameter?is?username
?*?Fifth?parameter?is?password
?*?@param?args
?*?@throws?ClassNotFoundException?
?*?@throws?SQLException?
?*/
public?static?void?main(String[]?args)?throws?ClassNotFoundException?SQLException?{
int?lenght?=?Integer.parseInt(args[1]);
StringBuilder?sb?=?new?StringBuilder();
while(lenght--?>?0){
sb.append(‘a‘);
}
try?{
MySqlClient?c?=?new?MySqlClient(args[2]?args[3]?args[4]);
c.writeSameEntryBatch(sb.toString

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\bin\
?????文件?????????238??2012-07-29?14:23??zookeeper-3.3.6\bin\README.txt
?????文件????????1843??2012-07-29?14:23??zookeeper-3.3.6\bin\zkCleanup.sh
?????文件????????1049??2012-07-29?14:23??zookeeper-3.3.6\bin\zkCli.cmd
?????文件????????1446??2012-07-29?14:23??zookeeper-3.3.6\bin\zkCli.sh
?????文件????????1333??2012-07-29?14:23??zookeeper-3.3.6\bin\zkEnv.cmd
?????文件????????2274??2012-07-29?14:23??zookeeper-3.3.6\bin\zkEnv.sh
?????文件????????1084??2012-07-29?14:23??zookeeper-3.3.6\bin\zkServer.cmd
?????文件????????5130??2012-07-29?14:23??zookeeper-3.3.6\bin\zkServer.sh
?????文件???????59687??2012-07-29?14:23??zookeeper-3.3.6\build.xml
?????文件???????52566??2012-07-29?14:23??zookeeper-3.3.6\CHANGES.txt
?????目錄???????????0??2017-09-13?10:09??zookeeper-3.3.6\conf\
?????文件?????????535??2012-07-29?14:23??zookeeper-3.3.6\conf\configuration.xsl
?????文件????????1698??2012-07-29?14:23??zookeeper-3.3.6\conf\log4j.properties
?????文件?????????426??2017-09-12?18:20??zookeeper-3.3.6\conf\zoo.cfg
?????文件?????????380??2012-07-29?14:23??zookeeper-3.3.6\conf\zoo.cfg.bak
?????文件?????????380??2012-07-29?14:23??zookeeper-3.3.6\conf\zoo_sample.cfg_1
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\benchmark\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\apache\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\apache\bookkeeper\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\apache\bookkeeper\benchmark\
?????文件????????4669??2012-07-29?14:22??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\apache\bookkeeper\benchmark\MySqlClient.java
?????文件????????8359??2012-07-29?14:22??zookeeper-3.3.6\contrib\bookkeeper\benchmark\org\apache\bookkeeper\benchmark\TestClient.java
?????文件????????5937??2012-07-29?14:22??zookeeper-3.3.6\contrib\bookkeeper\build.xml
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\src\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\src\java\
?????目錄???????????0??2017-09-12?18:17??zookeeper-3.3.6\contrib\bookkeeper\src\java\org\
............此處省略1590個文件信息

評論

共有 條評論