Question-87: You have a big Cassandra table with the overall size around 10M records. You run the following command.

 

COPY HE_KEYSPACE.TBL_HADOOPEXAM_COURSES TO ‘home/hadoopexam/he_courses_data.csv’ with HEADER=true and PAGETIMEOUT=40 and PAGESIZE=20 AND DELIMITER=’~’;

 

However, while doing this exercise. You get below error.

 

./dump_cassandra.sh: xmalloc: ../../.././lib/sh/strtrans.c:63: cannot allocate XXXXXXXXXX bytes (YYYYYYYY bytes allocated)", "stdout_lines": ["[Sat Jul 13 11:12:24 UTC 2019] Executing the following query:", "COPY HE_KEYSPACE.TBL_HADOOPEXAM_COURSES TO ‘home/hadoopexam/he_courses_data.csv’ with HEADER=true and PAGETIMEOUT=40 and PAGESIZE=20 AND DELIMITER=’~’;"

 

What is the cause and how can you correct the same?

 

  1. You have to remove PAGETIMEOUT parameter
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. Thanks for considering Python Certification Material

Ans : D

Exp : Yes, you can use the COPY TO command to copy data from Cassandra table to a csv file. However, you also need to know the use of each parameters for almost all basic command used. There are following command options. In real exam they would not ask for all the command but frequently used command you should know. One of the example is COPY TO and COPY FROM command.

 

PAGESIZE : This shows the page size while fetching the data. If your PAGESIZE is higher than PAGETIMEOUT should also be high.

 

 

You can access to full explanation to question and answer from this page.