I am trying to open a fileChooser using javafx FileChooser I'm assigning a listner to the FXML button via the controller the application loads fine, however when I click the button the file chooser opens followed promptly by a crash.
This is driving me nuts, I think it is todo with the implementation of the xcode interface from java, however I am totally lost on this one.
Has anymore come across this before when using JavaFx ??
my stack trace is:
012-12-06 23:24:02.732 java[16800:707] Invalid parameter not satisfying: cgsEvent.type > 0 && cgsEvent.type <= kCGSLastEventType
2012-12-06 23:24:02.733 java[16800:707] (
0 CoreFoundation 0x00007fff8b8c20a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff858393f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8b8c1ee8 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff89f926a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 AppKit 0x00007fff85d5356c -[NSEvent _initWithCGSEvent:eventRef:] + 2782
5 AppKit 0x00007fff85fd43ea +[NSEvent eventWithCGEvent:] + 243
6 libglass.dylib 0x00000001630e300f listenTouchEvents + 31
7 CoreGraphics 0x00007fff8be07115 processEventTapData + 150
8 CoreGraphics 0x00007fff8be06f68 _CGYPostEventTapData + 189
9 CoreGraphics 0x00007fff8be0c26a _XPostEventTapData + 107
10 CoreGraphics 0x00007fff8be0c362 CGYEventTap_server + 106
11 CoreGraphics 0x00007fff8be07056 eventTapMessageHandler + 30
12 CoreFoundation 0x00007fff8b831410 __CFMachPortPerform + 288
13 CoreFoundation 0x00007fff8b8312d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
14 CoreFoundation 0x00007fff8b831019 __CFRunLoopDoSource1 + 153
15 CoreFoundation 0x00007fff8b86419f __CFRunLoopRun + 1775
16 CoreFoundation 0x00007fff8b8636b2 CFRunLoopRunSpecific + 290
17 HIToolbox 0x00007fff882d40a4 RunCurrentEventLoopInMode + 209
18 HIToolbox 0x00007fff882d3d84 ReceiveNextEventCommon + 166
19 HIToolbox 0x00007fff882d3cd3 BlockUntilNextEventMatchingListInMode + 62
20 AppKit 0x00007fff85c74613 _DPSNextEvent + 685
21 AppKit 0x00007fff85c73ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
22 libglass.dylib 0x00000001630ce8c3 +[GlassApplication enterNestedEventLoopWithEnv:] + 163
23 libglass.dylib 0x00000001630d24d3 -[DialogDispatcher runModal] + 163
24 Foundation 0x00007fff8a012220 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 212
25 Foundation 0x00007fff8a0120c8 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
26 libglass.dylib 0x00000001630d29c5 Java_com_sun_glass_ui_mac_MacCommonDialogs__1showFileOpenChooser + 981
27 ??? 0x0000000101dc3f90 0x0 + 4326178704
)
2012-12-06 23:24:02.734 java[16800:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgsEvent.type > 0 && cgsEvent.type <= kCGSLastEventType'
First throw call stack:
(
0 CoreFoundation 0x00007fff8b8c20a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff858393f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8b8c1ee8 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff89f926a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 AppKit 0x00007fff85d5356c -[NSEvent _initWithCGSEvent:eventRef:] + 2782
5 AppKit 0x00007fff85fd43ea +[NSEvent eventWithCGEvent:] + 243
6 libglass.dylib 0x00000001630e300f listenTouchEvents + 31
7 CoreGraphics 0x00007fff8be07115 processEventTapData + 150
8 CoreGraphics 0x00007fff8be06f68 _CGYPostEventTapData + 189
9 CoreGraphics 0x00007fff8be0c26a _XPostEventTapData + 107
10 CoreGraphics 0x00007fff8be0c362 CGYEventTap_server + 106
11 CoreGraphics 0x00007fff8be07056 eventTapMessageHandler + 30
12 CoreFoundation 0x00007fff8b831410 __CFMachPortPerform + 288
13 CoreFoundation 0x00007fff8b8312d9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
14 CoreFoundation 0x00007fff8b831019 __CFRunLoopDoSource1 + 153
15 CoreFoundation 0x00007fff8b86419f __CFRunLoopRun + 1775
16 CoreFoundation 0x00007fff8b8636b2 CFRunLoopRunSpecific + 290
17 HIToolbox 0x00007fff882d40a4 RunCurrentEventLoopInMode + 209
18 HIToolbox 0x00007fff882d3d84 ReceiveNextEventCommon + 166
19 HIToolbox 0x00007fff882d3cd3 BlockUntilNextEventMatchingListInMode + 62
20 AppKit 0x00007fff85c74613 _DPSNextEvent + 685
21 AppKit 0x00007fff85c73ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
22 libglass.dylib 0x00000001630ce8c3 +[GlassApplication enterNestedEventLoopWithEnv:] + 163
23 libglass.dylib 0x00000001630d24d3 -[DialogDispatcher runModal] + 163
24 Foundation 0x00007fff8a012220 -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 212
25 Foundation 0x00007fff8a0120c8 -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:] + 131
26 libglass.dylib 0x00000001630d29c5 Java_com_sun_glass_ui_mac_MacCommonDialogs__1showFileOpenChooser + 981
27 ??? 0x0000000101dc3f90 0x0 + 4326178704
)
libc++abi.dylib: terminate called throwing an exception
The Controller code is:
public class AppController implements Initializable {
#FXML
private TableView<Transactions> tableTranactions;
#FXML
private TableColumn<Transactions, Integer> accountID;
#FXML
private TableColumn<Transactions, String> colTranDate;
#FXML
private TableColumn<Transactions, String> colDescription;
#FXML
private TableColumn<Transactions, Double> colAmount;
#FXML
private TableColumn<Transactions, Integer> colCompany;
#FXML
private TableColumn<Transactions, String> colTransType;
#FXML
private Button btnClear;
#FXML
private Button btnFileChoose;
#FXML
private LineChart<String, Double> chartLineSpendingByMonth;
#FXML
private Pane paneGraph;
#FXML
private Pane paneGraphWeek;
#FXML
private Pane paneAddRecord;
#FXML
private PieChart pieSpendingCatalogue;
#FXML
private Label lblTransactions;
#FXML
private TextField txtFilePath;
#Override
public void initialize(URL arg0, ResourceBundle arg1) {
// TODO Auto-generated method stub
System.out.println("starting application");
showTransactions();
btnFileChoose.setOnAction(new EventHandler<ActionEvent>() {
/**
WHAT IS CAUSING THIS CODE SEGMENT TO FAIL??? **/
#Override
public void handle(ActionEvent event) {
FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Select File");
//Set extension filter
FileChooser.ExtensionFilter extFilter =
new FileChooser.ExtensionFilter("CSV", ".csv");
fileChooser.getExtensionFilters().add(extFilter);
//Show open file dialog
File file = fileChooser.showOpenDialog(null);
if(file!=null)
txtFilePath.setText(file.getPath());
}
});
}
#FXML
private void showTransactions()
{
hideAll();
tableTranactions.setVisible(true);
btnClear.setVisible(true);
accountID.setCellValueFactory(new PropertyValueFactory<Transactions, Integer>("accountid"));
colTranDate.setCellValueFactory(new PropertyValueFactory<Transactions, String>("tranDate"));
colDescription.setCellValueFactory(new PropertyValueFactory<Transactions, String>("descrip"));
colAmount.setCellValueFactory(new PropertyValueFactory<Transactions, Double>("amount"));
colCompany.setCellValueFactory(new PropertyValueFactory<Transactions, Integer>("comid"));
colTransType.setCellValueFactory(new PropertyValueFactory<Transactions, String>("transType"));
updateTransactionData();
}
public void hideAll()
{
tableTranactions.setVisible(false);
btnClear.setVisible(false);
paneGraph.setVisible(false);
paneGraphWeek.setVisible(false);
paneAddRecord.setVisible(false);
}
public void clearTable()
{
ObservableList<Transactions> data = tableTranactions.getItems();
data.removeAll(data);
}
public void updateTransactionData()
{
TransactionDAO trans = new TransactionDAO();
ObservableList<Transactions> data = tableTranactions.getItems();
data.addAll(trans.getAll());
}
public void showAddRecord()
{
hideAll();
paneAddRecord.setVisible(true);
}
public void showHistoric()
{
hideAll();
CatalogueSpendingDAO catalogue = new CatalogueSpendingDAO();
ObservableList<PieChart.Data> data = pieSpendingCatalogue.getData();
ObservableList<CatalogueSpending_total> values = catalogue.getTotal();
data.removeAll(data);
for(CatalogueSpending_total i : values)
{
data.add(new PieChart.Data(i.getDescription(), i.getTotal()));
}
// start adding line chart
ObservableList<XYChart.Series<String, Double>> spendingByMonthData = chartLineSpendingByMonth.getData();
Boolean add = false;
if(spendingByMonthData.size() > 0)
spendingByMonthData.removeAll(spendingByMonthData);
XYChart.Series<String, Double> series = (spendingByMonthData.size() > 0 ? spendingByMonthData.get(0): null);
if(series == null)
{
series = new XYChart.Series<String, Double>();
add = true;
}
SpendingByMonthDAO spendingByMonthDAO = new SpendingByMonthDAO();
ObservableList<SpendingByMonth> spendingByMonthDatabase = spendingByMonthDAO.getTotal();
for(SpendingByMonth i : spendingByMonthDatabase)
{
series.getData().add(new XYChart.Data<String, Double>(i.getDate(), i.getTotal()));
}
spendingByMonthData.size();
spendingByMonthData.add(0,series);
pieSpendingCatalogue.animatedProperty();
paneGraph.setVisible(true);
}
public void showWeeklyCharts()
{
hideAll();
//TODO populate the graphs here
paneGraphWeek.setVisible(true);
}
}
System Information
java version: Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
OS: OS X 10.8.2
SOLVED:
Runtime compiler was a much older version of hava Java 1.7.0
Also found this link:
https://forums.oracle.com/forums/thread.jspa?threadID=2444130
It seems once I updated the jdk via http://jdk7.java.net/download.html to java version 7u10 Build b18 the problem goes away :-)
Related
I'm a beginner of spring webflux. While researching I found some code like:
Mono result = someMethodThatReturnMono().cache();
The name "cache" tell me about caching something, but where is the cache and how to retrieve cached things? Is it something like caffeine?
It cache the result of the previous steps of the Flux/Mono until the cache() method is called, check the output of this code to see it in action:
import reactor.core.publisher.Mono;
public class CacheExample {
public static void main(String[] args) {
var mono = Mono.fromCallable(() -> {
System.out.println("Go!");
return 5;
})
.map(i -> {
System.out.println("Double!");
return i * 2;
});
var cached = mono.cache();
System.out.println("Using cached");
System.out.println("1. " + cached.block());
System.out.println("2. " + cached.block());
System.out.println("3. " + cached.block());
System.out.println("Using NOT cached");
System.out.println("1. " + mono.block());
System.out.println("2. " + mono.block());
System.out.println("3. " + mono.block());
}
}
output:
Using cached
Go!
Double!
1. 10
2. 10
3. 10
Using NOT cached
Go!
Double!
1. 10
Go!
Double!
2. 10
Go!
Double!
3. 10
I try to establish a websocketconnection. But my websocketcontent keeps being rejected as not being readable. Right now I establish a connection by using the following handler stack:
p.addLast(ClientSslHandler),
p.addLast(new HttpClientCodec()),
p.addLast(new HttpObjectAggregator(8192)),
p.addLast(new WebSocketClientProtocolHandler(...)),
p.addlast(new myHandler);
The problem is (I think) that HttpClientCodec keeps encoding my Websocketframes as Httpframes.
Thats why i think I can use HttpClientUpgradeHandler so deal with the handshake and then change to a pure Websocketconnection. Is this a viable solution? Or are there other workarounds?
Edit: changed WebSocketClientProtocolHandler to HttpClientUpgradeHandler
Edit2:
public class ShipSocketClient {
static final String URL = System.getProperty("url", "wss://10.2.3.44:4712");
public static void main(String[] args) throws Exception{
URI uri = new URI(URL);
String scheme = uri.getScheme() == null? "ws" : uri.getScheme();
final String host = uri.getHost() == null? "127.0.0.1" : uri.getHost();
final int port;
if (uri.getPort() == -1) {
if ("ws".equalsIgnoreCase(scheme)) {
port = 80;
} else if ("wss".equalsIgnoreCase(scheme)) {
port = 443;
} else {
port = -1;
}
} else {
port = uri.getPort();
}
if (!"ws".equalsIgnoreCase(scheme) && !"wss".equalsIgnoreCase(scheme)) {
System.err.println("Only WS(S) is supported.");
return;
}
final boolean ssl = "wss".equalsIgnoreCase(scheme);
final SslContext sslCtx;
if (ssl) {
List<String> CipherList = new ArrayList<String>();
CipherList.add("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256");
//CipherList.add("TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8");
CipherList.add("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256");
File vidksFile = new File("C:\\Users\\LETTAU\\Videos\\key.pem");
File vidcertFile = new File("C:\\Users\\LETTAU\\Videos\\cert.pem");
//CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
sslCtx = SslContextBuilder.forClient()
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.ciphers(CipherList)
.protocols("TLSv1.2")
.clientAuth(ClientAuth.REQUIRE)
.keyManager(vidcertFile, vidksFile)
.build();
}
else{
sslCtx = null;
}
EventLoopGroup group = new NioEventLoopGroup();
try{
WebSocketClientHandshaker wsHandShaker = WebSocketClientHandshakerFactory.newHandshaker(
uri, WebSocketVersion.V13, "ship", false, new DefaultHttpHeaders());
WebSocketClientProtocolHandler wsPrClHandler = new WebSocketClientProtocolHandler(wsHandShaker,true);
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSocketChannel.class)
.handler(new ChannelInitializer<SocketChannel>() {
#Override
protected void initChannel(SocketChannel ch) {
ChannelPipeline p = ch.pipeline();
SslHandler ClientSslHandler = sslCtx.newHandler(ch.alloc(), host, port);
HttpClientCodec sourceCodec = new HttpClientCodec();
//New approach with HttpClientUpgradeHandler
//ShipClientProtocolHandler is a class which extends WebSocketClientProtocolHandler implements HttpClientUpgradeHandler.UpgradeCodec
HttpClientUpgradeHandler httpToWsUpgrader = new HttpClientUpgradeHandler(sourceCodec, new ShipClientProtocolHandler(wsHandShaker,true), 8096);
if (sslCtx != null) {
p.addLast(new LoggingHandler(LogLevel.INFO));
p.addLast(ClientSslHandler);
}
p.addLast(
new LoggingHandler(LogLevel.INFO),
sourceCodec,
new HttpObjectAggregator(8192),
//httpToWsUpgrader,
new LoggingHandler(LogLevel.INFO),
wsPrClHandler);
}
}
);
Channel ch = b.connect(uri.getHost(), port).sync().channel();
BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
while (true) {
String msg = console.readLine();
if (msg == null) {
break;
} else if ("ping".equals(msg.toLowerCase())) {
WebSocketFrame frame = new PingWebSocketFrame(Unpooled.wrappedBuffer(new byte[] { 8, 1, 8, 1 }));
ch.writeAndFlush(frame);
} else if ("cmi".equals(msg.toLowerCase())) {
ByteBuf bBuf = Unpooled.buffer(16);
bBuf.writeByte(0);
bBuf.writeByte(0);
BinaryWebSocketFrame bytebuffer = new BinaryWebSocketFrame(bBuf);
ch.writeAndFlush(bytebuffer);
} else if ("cdp".equals(msg.toLowerCase())) {
ByteBuf bBuf = Unpooled.buffer(1000);
//bBuf.writeByte(0);
//bBuf.writeByte(1);
ByteBufUtil.writeUtf8(bBuf,"{\"connectionHello\":[{\"phase\":\"ready\"},{\"waiting\":60000}]}");
BinaryWebSocketFrame bytebuffer = new BinaryWebSocketFrame(bBuf);
ch.writeAndFlush(bytebuffer);
} else {
WebSocketFrame frame = new TextWebSocketFrame(msg);
ch.writeAndFlush(frame);
}
}
} finally {
group.shutdownGracefully();
}
}
Edit3: Some addtitional Information on why i think HttpClientCodec is the problem:
This is what a received package looks like:
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 88 1d 11 30 53 54 41 54 45 5f 57 41 49 54 5f 43 |...0STATE_WAIT_C|
|00000010| 4c 4f 53 45 5f 43 4f 4e 4e 45 43 54 49 4f 4e |LOSE_CONNECTION |
+--------+-------------------------------------------------+----------------+
This is what an outgoing package looks like:
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 82 9d 12 1e 8c 5a 12 1f f7 78 71 71 e2 34 77 7d |.....Z...xqq.4w}|
|00000010| f8 33 7d 70 c4 3f 7e 72 e3 78 28 3c fe 3f 73 7a |.3}p.?~r.x(<.?sz|
|00000020| f5 78 6f |.xo |
+--------+-------------------------------------------------+----------------+
If you want to upgrade to WebSockets you should use the WebSocketClientHandshaker.
Netty itself contains an example for it:
https://github.com/netty/netty/tree/netty-4.1.28.Final/example/src/main/java/io/netty/example/http/websocketx/client
I am trying to use MultipleOutputs for changing output filename in reducer. I am using oozie workflow to run mapreduce job.
I am not able to find ways to add below property in oozie workflow -
MultipleOutputs.addNamedOutput(job, "text", TextOutputFormat.class, Text.class, Text.class);
As it is oozie mapreduce action, I don't have driver class to put above code.
The answer lies in the source code for the method.
From hadoop core 1.2.1 jar
/* */ public static void addNamedOutput(Job job, String namedOutput, Class<? extends OutputFormat> outputFormatClass, Class<?> keyClass, Class<?> valueClass)
/* */ {
/* 248 */ checkNamedOutputName(job, namedOutput, true);
/* 249 */ Configuration conf = job.getConfiguration();
/* 250 */ conf.set("mapreduce.multipleoutputs", conf.get("mapreduce.multipleoutputs", "") + " " + namedOutput);
/* */
/* 252 */ conf.setClass("mapreduce.multipleoutputs.namedOutput." + namedOutput + ".format", outputFormatClass, OutputFormat.class);
/* */
/* 254 */ conf.setClass("mapreduce.multipleoutputs.namedOutput." + namedOutput + ".key", keyClass, Object.class);
/* 255 */ conf.setClass("mapreduce.multipleoutputs.namedOutput." + namedOutput + ".value", valueClass, Object.class);
/* */ }
So, it points towards setting "mapreduce.multipleoutputs" again with space separated namedOutput and setting format, key and value classes using below variables.
"mapreduce.multipleoutputs.namedOutput." + namedOutput + ".format"
"mapreduce.multipleoutputs.namedOutput." + namedOutput + ".key"
"mapreduce.multipleoutputs.namedOutput." + namedOutput + ".value"
Hope it helps.
I was watching Google's I/O video on ViewHolder, but I'm lost on line 17. It looks like:
if (position & 1) {
holder.icon.setImageBitmap(mIcon1);
} else {
holder.icon.setImageBitmap(mIcon2);
}
What is the importance of if (position & 1)
1 public View getView(int position, View convertView, ViewGroup parent) {
2 ViewHolder holder;
3
4 if (convertView == null) {
5 convertView = mInflater.inflate(R.layout.list_item_icon_text, null);
6
7 holder = new ViewHolder();
8 holder.text = (TextView) convertView.findViewById(R.id.text);
9 holder.icon = (ImageView) convertView.findViewById(R.id.icon);
10
11 convertView.setTag(holder);
12 } else {
13 holder = (ViewHolder) convertView.getTag();
14 }
15
16 holder.text.setText(DATA[position]);
17 holder.icon.setImageBitmap((position & 1) == 1 ? mIcon1 : mIcon2);
18
19 return convertView;
20 }
Slide 13
https://dl.google.com/io/2009/pres/Th_0230_TurboChargeYourUI-HowtomakeyourAndroidUIfastandefficient.pdf
https://www.youtube.com/watch?v=N6YdwzAvwOA&t=10m14s
When querying 10K objects, it appears that querying each object individually with a find_one is much faster than $or-ing the queries together, which doesn't make much sense. Is there something wrong with the following making things slow? The query seems to hang for a while for the first 200 or so objects, and then finds all the rest very quickly.
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.mongodb.MongoClient;
public class MongoOrVsSingleQuery {
public static void main(String[] args) throws Exception {
MongoClient mc = new MongoClient();
mc.getDB("foo").dropDatabase();
DBCollection foo = mc.getDB("foo").getCollection("foo");
DBObject index = new BasicDBObject("a", 1);
index.put("b", 1);
foo.ensureIndex(index);
List<DBObject> lo = new LinkedList<DBObject>();
for (int i = 1; i < 10001; i++) {
DBObject o = new BasicDBObject("a", i);
o.put("b", 1);
lo.add(o);
}
System.out.println("insert: " + new Date());
foo.insert(lo);
for (DBObject o: lo) {
o.removeField("_id");
}
DBObject query = new BasicDBObject("$or", lo);
System.out.println("find one: " + new Date());
for (DBObject o: lo) {
foo.findOne(o).get("a");
}
System.out.println("find: " + new Date());
DBCursor dbc = foo.find(query);
for (DBObject o: dbc) {
if ((int) o.get("a") % 100 == 0) {
System.out.println("find obj: " + o.get("a") + " " + new Date());
}
}
System.out.println("done: " + new Date());
}
}
Output:
insert: Tue Nov 19 07:16:02 PST 2013
find one: Tue Nov 19 07:16:02 PST 2013
find: Tue Nov 19 07:16:05 PST 2013
find obj: 100 Tue Nov 19 07:16:08 PST 2013
find obj: 200 Tue Nov 19 07:21:22 PST 2013
find obj: 300 Tue Nov 19 07:21:22 PST 2013
*snip*
find obj: 9900 Tue Nov 19 07:21:22 PST 2013
find obj: 10000 Tue Nov 19 07:21:22 PST 2013
done: Tue Nov 19 07:21:22 PST 2013
During the query, this is typical output of currentOp():
~$ mongo
MongoDB shell version: 2.4.3
connecting to: test
> use foo
> db.currentOp()
{
"inprog" : [
{
"opid" : 40221,
"active" : true,
"secs_running" : 241,
"op" : "getmore",
"ns" : "foo.foo",
"query" : {
"$msg" : "query not recording (too large)"
},
"client" : "127.0.0.1:58696",
"desc" : "conn7",
"threadId" : "0x7fef961f8700",
"connectionId" : 7,
"locks" : {
"^" : "r",
"^foo" : "R"
},
"waitingForLock" : false,
"numYields" : 124,
"lockStats" : {
"timeLockedMicros" : {
"r" : NumberLong(390668733),
"w" : NumberLong(0)
},
"timeAcquiringMicros" : {
"r" : NumberLong(195362976),
"w" : NumberLong(0)
}
}
}
]
}
> db.version()
2.4.3