« first day (3832 days earlier)      last day (1106 days later) » 

12:00 AM
Hard work never killed anybody, but why take a chance? -- Charlie McCarthy (source)
 
 
2 hours later…
1:42 AM
 
 
6 hours later…
7:42 AM
reads a book
 
 
6 hours later…
1:42 PM
yawns loudly
 
 
2 hours later…
3:21 PM
morno
 
Zoe
corno
 
forno
btw....
stonks!
 
Zoe
Is that good or bad?
 
oh no
not the blue line
you got 0 of something instead of 150 :(((
 
Zoe
oh no, the horror
anyway
 
3:33 PM
@wonderb0lt I should have gone for the red line, I know
but I was young and silly
wait, I still am
 
I am not :'(
 
this is over the past 2 weeks:
also, yes, I am a legend
@Zoe they are credits for my database
I did... kind of inserted 20 million records though...
 
Zoe
yikes
 
but still like 100M to go
I guess I will have to wait until my credits start coming back again
 
#420blazeit
 
3:37 PM
I get 6 per hour...
I spent like... 100 in 2 hours
 
wietlol = 0
 
@Wietlol What kind of data are you inserting?
 
candlesticks
 
what kind of db ist that?
 
mysql
t2.micro (aws)
@Michael candlestick data of crypto exchanges
per minute
starting from first of januari this year
from... a ton of exchanges
 
3:42 PM
whats the size of one record
 
not that much actually
is there any way I can just see the size?
 
if it was postgres I could give you the answer
I guess mysql also maintains a metadata table
 
I hope you don't maintain a primary key constraint except your autogenererated id
 
nah
still, considering the number of records added and the capacity of the machine running the database, it is quite a lot
 
3:46 PM
are you also calculating stuff or just persisting data?
 
64 bytes for the doubles
4 for the int
8 for the bigint
20 for the varchar
and whatever for the datetimes
(approximately 100 bytes per record)
just persisting
 
I guess your connection is completely out of capacity :D
 
perhaps I should just generate a csv and store it locally for now
@motaa my database is
it burnt through it's cpu credits
 
persisting 100mio records will take me like 30minutes to persist and those records are way bigger in size
are you persisting through jdbc?
 
I don't even know if a relational database is the correct tool for this...
 
3:52 PM
well
one has like 3 possibilities to persist data into a db with jdbc
one is creating a new statement and execute that every time -> slow as fck
second: jdbc provides the system of batches -> medium speed
third: use the copy api of jdbc and pipe csv-strings right into the pipe -> "fasted" and my favorite
forth: use third but with binary format
 
@motaa again, I paid for a hamster database server, I get shit performance
there is nothing wrong with the approach I do or how it is stored or how I am querying/inserting it
it is just that I picked the smallest instance type because of $ :D
 
hehe
 
I will continue the import when the credits are back up
 
@Wietlol well yours is not even the smallest :D
you can get t2.nano
 
hmm...
not for mysql tho, iirc
 
4:00 PM
ye I just quickly googled it: aws.amazon.com/de/ec2/instance-types/t2
but man, that is not much ram and only one core :D
I would be more interested on the throughput I get ^^
 
cant even select t2 any more :D
it is now completely replaced by t3
 
hehe
 
lol
google translate ++
 
haha
Surname muahaha
 
if I use gTranslate to translate the page to english
 
4:07 PM
you should check if you can use the m6g (Graviton2 processors), they're usually pretty cheap and a good choice if you're not planning to run the bottom-of-the-barrel stuff
 
 
4 hours later…
8:05 PM
Hi - I have a question
I have an API response in JSON - I have a POJO I want to deserialize it to - In some scenarios, some fields of the json might be missing. In those cases, I want to throw an exception. What is happening now is that the pojo is getting built with that entry as null. What is the best way to go about it?

What I tried: Including the notnull/nonnull annotation for the fields but that doesn't seem to be respected by the mapper.
 
what serialization library do you use?
 
8:24 PM
Jackson
 
29
A: Jackson @JsonProperty(required=true) doesn't throw an exception

Bojan PetkovicWith Jackson 2.6 you can use required, however you have to do it using JsonCreator For example: public class MyClass { @JsonCreator public MyClass(@JsonProperty(value = "x", required = true) Integer x, @JsonProperty(value = "value_y", required = true) Integer y) { this.x = x; ...

 
I use all lombok annotations for generation of constructors - I cant touch the constructor code
 

« first day (3832 days earlier)      last day (1106 days later) »