Questions tagged [collect]

Use this tag for questions related to the act of gathering/collecting/grouping data/results from several nodes/places/computers to one (or main) resource(s).

Use this tag for questions related to the act of gathering/collecting/grouping data/results from several nodes/places/computers to one (or main) resource(s).

For example, in Distributed Computing, the slaves would do their local computation and eventually, one would like the master to collect the (local) results.

354 questions
0
votes
2 answers

Filtering data with a stream that consists of a list?

elementList is a list of all elements class Element{ private ArrayList shapeList = new ArrayList(); } ... class Shape{ private String color; private String shape; } Trying to filter a list of elements, of which each…
user1781523
0
votes
2 answers

Collect optional items

Given Guava Immutable table, i need to process all cell and and filter out some cells based on some mapper result which returns Java Optional, immutbleTable.cellSet() .parallelStream() .map(cell ->…
sidss
  • 923
  • 1
  • 12
  • 20
0
votes
2 answers

Scala Filter and Collect is slow

I am just beginning with Scala development and am trying to filter out unnecessary lines from an iterator using filter and collect. But the operation seems to be too slow. val src = Source.fromFile("/home/Documents/1987.csv") // 1.2 Million val iter…
Lawan subba
  • 610
  • 3
  • 7
  • 19
0
votes
1 answer

Collectl How to get timestamp per interval

I have created an export module that uses variables from the collectl/formatit.ph script. I am trying to get the collectl timestamp that's used during every interval cycle, for example the timestamps that are shown when passing "-oT" to collectl.…
Alvi K
  • 1
0
votes
1 answer

neo4j filter results from collect

My problem is this, I have a query like this one: MATCH (a:A), (a)-[:relation]-(b:B) RETURN {name: a.name, products: COLLECT(DISTINCT {productName: b.name, ident: b.identifier}) } and I can't find a way to filter the result of 'products', for…
chris
  • 35
  • 5
0
votes
2 answers

What is simplest way to convert :pluck or :collect results to array of strings in Rails?

I have a model called Record and belongs Product model, the price column type is hexadecimal. Rails already convert it to string in view. But I wanna get them in my console queries. Example code for pluck: Product.first.records.pluck(:price) This…
thatway_3
  • 404
  • 1
  • 10
  • 22
0
votes
1 answer

Transform to map with predictable order

I have following code: users.stream() .sorted((u1, u2) -> u2.getScore().compareTo(u1.getScore())) .limit(count) .collect(Collectors.toMap((User::getName), (User::getScore))); Content of result is…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
0
votes
2 answers

Retrieve value between two string using sed or awk

I am trying to retrieve value between two strings which are present multiple time in one single line. here is what I got: time="1441491171" somethingstuffpossible the order for these strings as it might change…
user2335924
  • 57
  • 1
  • 9
0
votes
3 answers

PHP array collect

I have alphabet array 24 character: "A B C D E F G H I J K L M N O P Q R S T U V W X" I want collect all case with: 3 unique characters. First case: ABC, DEF, GHI, JKL, MNO, PQR, STU, VWX
B11002
  • 95
  • 1
  • 2
  • 5
0
votes
2 answers

Common ways of collecting logs for use in logstash

I just got ELK-stack (Elastic, Logstash and Kibana) up and running. And now I'm ready to start processing logs. My question is: What are common ways of collecting logs for handling with logstash ? Scenario: I have some logs on a server, that I need…
user191152
0
votes
1 answer

collect result from alert dialog and continue execution of code once result received

My code should show an alert dialog with list of strings. once user selects one, that string I need to use. I have function handleIt() in main activity which calls getTagSelectionFromDialogBox(). There is public String selectedTitle and public…
0
votes
1 answer

Spark: Collect/parallelize on RDD is "faster" than "doing nothing" on RDD

I'm trying to improve my Spark app code understanding "collect", and I'm dealing with this code: val triple = logData.map(x => x.split('@')) .map(x => (x(1),x(0),x(2))) .collect() .sortBy(x =>…
Fabio Fantoni
  • 3,077
  • 3
  • 22
  • 32
0
votes
1 answer

Stream to Map

I have a Stream of a file, now i want to combine equal words into a Map which counts, how often the word is in the Stream. I know that I have to use collect(Collectors.groupingBy(..)), but i do not know how to use…
0
votes
2 answers

How to collect defined items in lists python

I have to find the signs "a..,z", "A,..,Z", "space", "." and "," in some data. I have tried the code: fh = codecs.open("mydata.txt", encoding = "utf-8") text = fh.read() fh1 = unicode(text) dic_freq_signs =…
Babe
  • 9
  • 1
  • 1
  • 2
0
votes
1 answer

ODK Collect Image Quality

As now the smartphones are coming with 16 MP cameras, and the picture size is coming to 5 MB. Uploading them on Mobile data will take some time and also more data, resulting in poor performance of App. Is there any way, that the ODK collect resizes…