Hands-On Guide To Apache Spark 3: Build Scalable Computing Engines For Batch and Stream Data Processing 1st Edition Alfonso Antolínez García Instant Download
Hands-On Guide To Apache Spark 3: Build Scalable Computing Engines For Batch and Stream Data Processing 1st Edition Alfonso Antolínez García Instant Download
https://ebookmeta.com/product/modern-data-engineering-with-
apache-spark-a-hands-on-guide-for-building-mission-critical-
streaming-applications-1st-edition-scott-haines/
https://ebookmeta.com/product/chess-explained-
the-c3-sicilian-1st-edition-sam-collins/
https://ebookmeta.com/product/starting-out-the-c3-sicilian-1st-
edition-john-emms/
https://ebookmeta.com/product/savage-club-curve-series-1st-
edition-nell-alexander-2/
Otherness and Identity in the Gospel of John 1st
Edition Sung Uk Lim
https://ebookmeta.com/product/otherness-and-identity-in-the-
gospel-of-john-1st-edition-sung-uk-lim/
https://ebookmeta.com/product/the-impact-of-corporate-culture-
and-cms-a-cross-cultural-analysis-on-internal-and-external-
preventive-effects-on-corruption-1st-edition-kai-d-bussmann/
https://ebookmeta.com/product/adoption-and-law-the-unique-
personal-experiences-of-birth-mothers-in-adoption-
proceedings-1st-edition-lisamarie-deblasio/
https://ebookmeta.com/product/machine-learning-for-knowledge-
discovery-with-r-methodologies-for-modeling-inference-and-
prediction-1st-edition-kao-tai-tsai/
https://ebookmeta.com/product/learning-to-trust-the-trust-series-
book-1-susan-horsnell/
Stem Cell Niche Kursad Turksen
https://ebookmeta.com/product/stem-cell-niche-kursad-turksen/
Alfonso Antolínez García
Apress Standard
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Scalable
Apache Spark is an open source framework intended to provide
parallelized data processing at scale. At the same time, Spark high-level
functions can be used to carry out different data processing tasks on
datasets of diverse sizes and schemas. This is accomplished by
distributing workloads from several servers to thousands of machines,
running on a cluster of computers and orchestrated by a cluster
manager like Mesos or Hadoop YARN. Therefore, hardware resources
can increase linearly with every new computer added. It is worth
clarifying that hardware addition to the cluster does not necessarily
represent a linear increase in computing performance and hence linear
reduction in processing time because internal cluster management,
data transfer, network traffic, and so on also consume resources,
subtracting them from the effective Spark computing capabilities.
Despite the fact that running in cluster mode leverages Spark’s full
distributed capacity, it can also be run locally on a single computer,
called local mode.
If you have searched for information about Spark before, you
probably have read something like “Spark runs on commodity
hardware.” It is important to understand the term “commodity
hardware.” In the context of big data, commodity hardware does not
denote low quality, but rather equipment based on market standards,
which is general-purpose, widely available, and hence affordable as
opposed to purpose-built computers.
Ease of Use
Spark makes the life of data engineers and data scientists operating on
large datasets easier. Spark provides a single unified engine and API for
diverse use cases such as streaming, batch, or interactive data
processing. These tools allow it to easily cope with diverse scenarios
like ETL processes, machine learning, or graphs and graph-parallel
computation. Spark also provides about a hundred operators for data
transformation and the notion of dataframes for manipulating semi-
structured data.
Figure 1-2 Spark communication architecture with worker nodes and executors
Spark Core
Spark Core is the bedrock on top of which in-memory computing, fault
tolerance, and parallel computing are developed. The Core also
provides data abstraction via RDDs and together with the cluster
manager data arrangement over the different nodes of the cluster. The
high-level libraries (Spark SQL, Streaming, MLlib for machine learning,
and GraphX for graph data processing) are also running over the Core.
Spark APIs
Spark incorporates a series of application programming interfaces
(APIs) for different programming languages (SQL, Scala, Java, Python,
and R), paving the way for the adoption of Spark by a great variety of
professionals with different development, data science, and data
engineering backgrounds. For example, Spark SQL permits the
interaction with RDDs as if we were submitting SQL queries to a
traditional relational database. This feature has facilitated many
transactional database administrators and developers to embrace
Apache Spark.
Let’s now review each of the four libraries in detail.
Spark Streaming
Spark Structured Streaming is a high-level library on top of the core
Spark SQL engine. Structured Streaming enables Spark’s fault-tolerant
and real-time processing of unbounded data streams without users
having to think about how the streaming takes place. Spark Structured
Streaming provides fault-tolerant, fast, end-to-end, exactly-once, at-
scale stream processing. Spark Streaming permits express streaming
computation in the same fashion as static data is computed via batch
processing. This is achieved by executing the streaming process
incrementally and continuously and updating the outputs as the
incoming data is ingested.
With Spark 2.3, a new low-latency processing mode called
continuous processing was introduced, achieving end-to-end latencies
of as low as 1 ms, ensuring at-least-once2 message delivery. The at-
least-once concept is depicted in Figure 1-5. By default, Structured
Streaming internally processes the information as micro-batches,
meaning data is processed as a series of tiny batch jobs.
Spark GraphX
GraphX is a new high-level Spark library for graphs and graph-parallel
computation designed to solve graph problems. GraphX extends the
Spark RDD capabilities by introducing this new graph abstraction to
support graph computation and includes a collection of graph
algorithms and builders to optimize graph analytics.
The Apache Spark ecosystem described in this section is portrayed
in Figure 1-6.
Figure 1-6 The Apache Spark ecosystem
In Figure 1-7 we can see the Apache Spark ecosystem of connectors.
Figure 1-8 Hierarchical relationship between data, data analytics, and data insight
extraction
1.6 Summary
In this chapter we briefly looked at the Apache Spark architecture,
implementation, and ecosystem of applications. We also covered the
two different types of data processing Spark can deal with, batch and
streaming, and the main differences between them. In the next chapter,
we are going to go through the Spark setup process, the Spark
application concept, and the two different types of Apache Spark RDD
operations: transformations and actions.
Footnotes
1 www.databricks.com/blog/2014/11/05/spark-officially-sets-a-
new-record-in-large-scale-sorting.html
2 With the at-least-once message delivery semantic, a message can be delivered
more than once; however, no message can be lost.
3 www.statista.com/statistics/871513/worldwide-data-created/
Now that you have an understanding of what Spark is and how it works, we can get you set up to start using
it. In this chapter, I’ll provide download and installation instructions and cover Spark command-line utilities
in detail. I’ll also review Spark application concepts, as well as transformations, actions, immutability, and
lazy evaluation.
This will download the file spark-3.3.0-bin-hadoop3.tgz or another similar name in your case,
which is a compressed file that contains all the binaries you will need to execute Spark in local mode on your
local computer or laptop.
What is great about setting Apache Spark up in local mode is that you don’t need much work to do. We
basically need to install Java and set some environment variables. Let’s see how to do it in several
environments.
$ java -version
If Java is already installed on your system, you get to see a message similar to the following:
$ java -version
java version "18.0.2" 2022-07-19
Java(TM) SE Runtime Environment (build 18.0.2+9-61)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)
Your Java version may be different. Java 18 is the Java version in this case.
If you don’t have Java installed
1. Open a browser window, and navigate to the Java download page as seen in Figure 2-2.
2. Click the Java file of your choice and save the file to a location (e.g., /home/<user>/Downloads).
$ cd PATH/TO/spark-3.3.0-bin-hadoop3.tgz_location
and execute
$ su -
Password:
$ cd /home/<user>/Downloads/
$ mv spark-3.3.0-bin-hadoop3 /usr/local/spark
$ exit
export SPARK_HOME=/usr/local/spark
export PATH=$PATH:$SPARK_HOME/bin
Use the following command for sourcing the ~/.bashrc file, updating the environment variables:
$ source ~/.bashrc
$ $SPARK_HOME/bin/spark-shell
If Spark is installed successfully, then you will find the following output:
Using Scala version 2.12.15 (Java HotSpot(TM) 64-Bit Server VM, Java 18.0.2)
Type in expressions to have them evaluated.
Type :help for more information.
scala>
You can try the installation a bit further by taking advantage of the README.md file that is present in the
$SPARK_HOME directory:
The Spark context Web UI would be available typing the following URL in your browser:
http://localhost:4040
There, you can see the jobs, stages, storage space, and executors that are used for your small application.
The result can be seen in Figure 2-3.
Figure 2-3 Apache Spark Web UI showing jobs, stages, storage, environment, and executors used for the application running on
the Spark shell
java -version
You must see the same signature you copied before; if not, something is wrong. Try to solve it by
downloading the file again.
b. SPARK_HOME: \PATH\TO\YOUR\SPARK-DIRECTORY
c. HADOOP_HOME: \PATH\TO\YOUR\HADOOP-DIRECTORY
You will have to repeat the previous step twice, to introduce the three variables.
5. Then, click your Edit button, Figure 2-6 left, to edit your PATH.
b. %SPARK_HOME%\bin
c. %HADOOP_HOME%bin
Configure system and environment variables for all the computer’s users.
7. If you want to add those variables for all the users of your computer, apart from the user performing this
installation, you should repeat all the previous steps for the System variables, Figure 2-6 bottom-left,
clicking the New button to add the environment variables and then clicking the Edit button to add them
to the system PATH, as you did before.
rootLogger.level = info
rootLogger.level = ERROR
This will create a RDD. You can view the file’s content by using the next instruction:
file.take(10).foreach(println)
T
he schooner had sailed!
When the dismay caused by this unlooked-for turn of events
had somewhat abated, Jack, catching sight of the black boy's
lugubrious face, fell to laughing heartily.
“After all,” said Don, following his chum's example, “it's no use
crying over spilt milk. I'm not sure but this is the best thing that
could have happened, Jack.”
“My opinion exactly. We began the quest without the guv's
knowledge, and nolens volens we must continue it without his
consent. What's the next piece on the programme, old fellow?”
Don pondered for a moment.
“Why, first,” said he, “we must ascertain whether that fellow told
us the truth about the shark-charmer's having gone across the Strait.
If it turns out that he has, then I'm not exactly clear yet as to what
our next move will be, though I've an idea. You shall hear what it is
later on.”
“All right,” said Jack “whatever course you decide on, I'm with you
heart and fist, anyhow.”
Arrived in the vicinity of the bazaar, Puggles was at once
despatched to learn what he could of the shark-charmer's
movements. In half an hour he returned. His report confirmed that
which they had already heard. The shark-charmer had undoubtedly
sailed for the opposite side of the Strait.
Throwing himself upon his back in the shade of the banyan tree
which had witnessed the discovery of the pearls, Don drew his
helmet over his eyes, and pondered long and deeply.
“Jack,” said he at length, “how much money have you?”
Jack turned out his pockets.
“Barely a rupee and a half,” said he,
“And I,” added Don, turning out his own, “have four and a half.”
“Here one rupee got, sa'b,” cried Puggles, tugging at his waist-
cloth. “Me giving him heart and fist, anyhow.”
“That makes seven rupees, then,” said his master, laughing; “not
much to continue the quest on, eh, Jack?”
“We'll manage,” said Jack hopefully. “But, I say, you haven't told
us your plans yet, old fellow.”
“Oh, our course is as plain as a pikestaff. We'll hire a native boat,
and follow the shark-charmer across the Strait. The only question is,
where's enough money to come from?”
“Don't know,” said Jack, “unless we try to borrow it in the bazaar.”
At this juncture there occurred an interruption which, unlikely
though it may seem, was destined to lead to a most satisfactory
solution of this all-important and perplexing question.
While this conversation was in progress Puggles had seated
himself at a short distance behind his master, and throwing his
turban aside, proceeded to untie and dress the one tuft of hair which
adorned the back of his otherwise cleanly shaven head.
Directly above the spot where he sat there extended far out from
the trunk of the banyan a branch of great size, from which dangled
numerous rope-like air-roots, which, reaching to-within a few feet of
the ground, swayed to and fro in the morning breeze. Out along this
branch crept a large black monkey, which, after taking a cautious
survey of Puggles and his unconscious neighbours, glided noiselessly
down one of the swinging roots, and from its extremity dropped
lightly to the ground within a yard of the discarded turban.
Cautiously, with his cunning ferret-eyes fastened on the preoccupied
Puggles, the monkey approached the coveted prize, snatched it up,
and with a shrill cry of triumph turned tail and fled.
Looking quickly round at the cry, Puggles took in the situation at a
glance.
“Sa'b! Sar!” he shouted, invoking the aid of both his master and
Jack in one breath, “one black debil monkey me turban done
hooking;” and leaping to his feet he gave chase.
“Why,” said Jack, “the little beast is making a bee-line for the old
fort. It must be Bosin, Captain Mango's pet monkey.”
“Captain Mango!” cried Don, as though seized with some sudden
inspiration. “Never thought of him until this minute!” and, clapping
on his helmet, he set off at a run after Puggles and the monkey.
Away like the wind went the monkey, the stolen turban trailing
after him through the sand like a great serpent; and away went
Puggles, his back hair flying. But while Puggles was short of wind,
the monkey was nimble of foot. The race was, therefore, unequal
from the start, its finish more summary than satisfactory; for as
Puggles ran, with his eyes glued upon the scurrying monkey, and his
mouth wide-stretched, his foot unluckily came in contact with a tree-
root, which lay directly across his path. Immediately beyond was a
bed of fine soft sand, and into this he pitched, head foremost. Just
then his master came up, with Jack at his heels.
“Sa'b! Sar!” spluttered Puggles, knuckling his eyes and spitting
sand right and left, “debil monkey done stole turban. Where him
going, sa'b?”
“Come on, Pug,” his master called out as he ran past; “your
headgear's all right—the monkey's taken it into the fort.”
The structure known as “the fort” occupied the summit of a sandy
knoll, about which grew a thick plantation of cocoanut palms,
seemingly as ancient as the fort itself. The walls of the enclosure had
so crumbled away in places as to afford glimpses of the buildings
within. These were two in number—one an ancient godown, as
dilapidated as the surrounding wall; the other, a bungalow in
excellent repair, blazing in all the glory of abundant whitewash.
Towards this building, after passing the tumble-down gateway,
with its turreted side-towers alive with pigeons, Don and his
companion shaped their course; for this was by no means their first
visit to the fort. A broad, low-eaved verandah shaded the front of
the bungalow, and upon this opened two or three low windows and
a door. As they drew near a shadow suddenly darkened the doorway,
and there emerged upon the verandah an individual whose pea-
jacket and trousers of generous nautical cut unmistakably
proclaimed him to be a seafaring man. About his throat a
neckerchief of a deep marine blue was tied in a huge knot; while
from beneath the left leg of his wide pantaloons there projected the
end of a stout wooden substitute for the real limb.
On catching sight of his visitors an expression of mingled
astonishment and pleasure overspread his honest, bronzed features.
“What with the cutlasses and guns, and the captain's wooden leg,
to say nothing of our small-arms, Don,” said Jack, “we'd better set
up for buccaneers at once.”
“Shiver my main-brace! a wooden leg ain't sich a bad article arter
all,” rejoined the captain; “specially when a seaman falls overboard.
With a life-buoy o' that nater rove on to his starn-sheets, he's sartin
to keep one leg above water, says you.”
“No doubt of that, even if he goes down by the head,” assented
Don, laughing. “But, I say, captain, what's in the keg—spirits?”
“Avast there!” replied the captain, half shutting one eye and
contemplating the keg with the other, “that 'ere keg, lads, has stuff
in its hold what's a sight better'n spurts. Gunpowder, lads, that's
what it is; and spike my guns if we don't broach the same to the
health of old Salambo when we falls in with him. What say you,
lads?
H
er light sails winged to catch every breath of the light but
steady breeze that chased her astern, the cutter for some
hours bowled through the water merrily. In the cabin Puggles
and the captain's Black servant snored side by side; whilst Don and
Jack lolled comfortably just abaft the mast-, where the night wind,
soft and spicy as the breath of Eden, would speedily have lulled
them to slumber but for the excitement that fired their blood. The
Captain was at the tiller, Bosin curled up by his side.
“If this 'ere wind holds, lads,” exclaimed the old sailor abruptly,
after a prolonged silence on his part, “we'd orter make the island
agin sunrise, shiver my forefoot if we don't!”
Don looked up with half-sleepy interest. “Island, captain? I
thought we were heading straight for the Indian coast.”
“Ay, so we be, straight away. But, y'see, lad, as I hinted a while
back, I has a sort o' innard idee, so to say, as the old woman ain't
on the mainland.”
“What old woman?” queried Jack, yawning. “Didn't know there
was one in the case, captain.”
The old sailor burst into a roar of laughter. “An' no more there
ain't, lad,” chuckled he; “an' slit my hammock if we wants one, says
you. Forty odd year has I sailed the seas, an' hain't signed articles
with any on 'em yet. A tight leetle wessel's the lass for me, lads; for,
unship my helm! she never takes her own head for it, says you.”
“Then what about the old woman you mentioned captain?” said
Don banteringly.
“Avast there now! An' d'ye mean to say,” demanded the captain
incredulously, “as you ain't ever hear'd tell o' the fish what sails
under that 'ere name? And a wicious warmint he is, too, shiver my
keelson! Hysters is his wittles, an' pearls his physic; he lives on 'em,
so to say; an' so I calls the cove as took them pearls o' your'n in tow
an old woman; an' why not, I axes?”
“But what about the island you spoke of just now, captain?”
“Why, d'ye see, it's this way, lads; there's an island off the coast
ahead, a sort o' holy place like, where them thievin' natives goes
once a year an' gets salwation from their sins. Howsomedever, that's
neither here nor there, says you; the p'int's this, lads: Somewheres
about the month o' March, which is this same month, says you, here
the priests flocks from all parts, an' here they stays until they gets a
purty pocketful o' cash. Now, my idee's this, d'ye see: the old
woman—which I means Salambo—lays alongside the schooner an'
takes them pearls o' your'n in tow. What for? says you. Cash, says I.
An' so, shiver my main-brace, he shapes his course for this 'ere
island, an' sells 'em to the priests.”
“Very likely,” assented Don. “He's bound to carry them to the best
market, of course.”
“And equally of course the best market is where the most priests
are. By Jove, you have a headpiece, captain!” put in Jack.
“I'm afraid, though,” resumed Don, after a moment's silence, “I'm
afraid it's not going to be so easy to come at the old fellow as we
think. You say this island's a sort of holy place; well, it's bound to be
packed with natives to the very surf-line in that case. Rather ticklish
work, I should think, taking the old fellow among so many pals.
There's the getting ashore, too; what's to prevent their sighting us?”
“Belay there!” roared the captain, vigorously thumping the bottom
of the boat with his wooden leg. “Shiver my main-brace! what sort o'
craft do ye take me for, I axes? A island's a island the world over—a
lump o' land what's floated out to sea. Wery good, that bein' so—
painters an' boathooks!—ain't it as easy a-boardin' of her through
the starn-ports as along o' the forechains?”
“Oh, you mean to make the back of the island, and steal a march
on old Salambo from the rear, then?” cried Don. “A capital idea!”
“You're on the right tack there, lad,” assented the captain.
“There's as purty a leetle cove at the backside o' that island as ever
wessel cast anchor in, an' well I knows it, shiver my binnacle!
Daylight orter put us into it, if so be—— Split my sprit-sail, lads, if it
ain't a-fallin' calm!”
It was now five o'clock, and as day broke the cutter, with a
freshening breeze on her starboard quarter, bore away for the island,
now in full view. When about a mile short of it, however, the captain
laid the boat's head several points nearer the wind, and shaped his
course as though running past it for the mainland, which lay like a
low bank of mist on the horizon. In the cuddy Puggles was busy with
preparations for breakfast, whilst Don lolled on the rail, watching the
shore, and idly trailing one hand in the water.
“Hullo! what's this?” he exclaimed suddenly, examining with
interest a fragment of dripping cloth that had caught on his hand.
“Jack, come here!”
Jack happened to be forward just then, hanging out his drenched
clothes to dry upon an improvised line, but hearing Don's
exclamation, he sprang aft. Somehow he was always expecting
surprises now.
“Look here,” said Don, rapidly spreading out the soaked cloth upon
his knee, “have you ever seen this before?”
“Not likely!—a mere scrap of rag that some greasy native——”
Jack began, eyeing the said scrap of rag contemptuously. But
suddenly his tone changed, and he gasped out: “By Jove, old fellow,
it's not the handkerchief, is it?”
“The very same!” replied-Don, rising and hurrying aft to where the
captain stood at the tiller. “I say, captain, you remember my telling
you how I tied a handkerchief round that bag of pearls? Well, here's
the identical 'wipe.' with my initials on it as large as life. Just fished it
out of the water.”
For full a minute the old sailor stared at him open-mouthed. Then:
“Flush my scuppers,” roared he, “if this 'ere ain't the tidiest piece o'
luck as ever I run agin. We've got the warmint safe in the maintop,
so to say, where he can't run away—shiver my main-brace if we
ain't!”
“Thanks to your clear head, captain,” said Don. “It certainly does
look as if he had come straight to the island here.”
“We'll purty soon know for sartin; we're a-makin' port hand over
fist,” rejoined the captain, bringing the cutter's head round, and
running under the lee of the island.
This side, unlike the wind-swept seaward face, was thickly clad in
jungle, above which at intervals towered a solitary palm like a
sentinel on duty. No traces of human habitation were to be seen; for
a rocky backbone or ridge, running lengthwise of the island, isolated
its frequented portion from this jungly half. Midway between the
extremities of this ridge rose two hills: one a symmetrical, cone-
shaped elevation, clad in a mantle of jungle green; the other a vast
mass of naked rock, towering hundreds of feet in air, and in its
general-outline somewhat resembling a colossal kneeling elephant.
As if to heighten the resemblance, there was perched upon the lofty
back a native temple, which looked for all the world like a gigantic
howdah.
“D'ye see them elewations, lads?” cried the captain, heading the
cutter straight for what-appeared to be an unbroken line of jungle.
“A. brace o' twins, says you. Wery good; atween 'em lies as purty a
leetle cove as wessel ever cast anchor in—slip my cable if it ain't!”
“Are you sure you're not out of your reckoning, captain?” said
Jack, scanning the shore-line with dubious eye. “It's no
thoroughfare, so far as I can see.”
“Avast there! What d'ye say to that, now?” chuckled the captain,
as the cutter, in obedience to a movement of the tiller, swept round
a tiny eyot indistinguishable in its mantle of green from, the shore
itself, and entered a narrow, land-locked creek, whose precipitous
sides were completely covered from summit to water-line with a rank
growth of vegetation. “Out with the oars, lads! a steam-whistle
couldn't coax a wind into the likes o' this place, says you.”
The oars run out, they pulled for some distance through this
remarkable rift in the hills, the cutter's mast in places sweeping the
overhanging jungle; until at last a spot was reached where a side
ravine cleft the cliff upon their left, terminating at the water's edge
in a strip of sandy beach, thickly shaded with cocoa-nut palms.
“Stow my cargo!” chuckled the captain, as he ran the cutter bow-
on into the sand, “a nautical sea-sarpent himself couldn't smell us
out here, says you. So here we heaves to, and here we lies until——
swabs an' slush-buckets, what's this?”
For the captain had already scrambled ashore, and as he uttered
these words he stooped and intently examined the sand at his feet.
In it were visible recent footprints, and a long trailing furrow that
started from the water's edge and ran for several yards straight up
the beach. Where the furrow terminated there lay a native ballam.
Jack was first to espy the canoe. Guessing the cause of the
captain's sudden excitement, he ran up the sands to the spot where
the rude vessel lay. The ballam was still dripping sea-water; and in
it, amid a pool of blood, lay a sailors sheath-knife.
“The lascar!” he shouted, snatching up the blood-stained weapon,
and holding it out at arms length, as Don and the captain hurried
up; “we've landed in his very tracks!”
CHAPTER VI.—IN THE THICK OF IT.
E
ither the lascar's wound had not proved as serious as Jack
surmised, or the fellow was endowed with as many lives as a
cat. At all events, he had reached land before them, and in
safety.
“Sharks an' sea-sarpents!” fumed the captain, Stumping excitedly
round and round the canoe. “The warmint had orter been sent to
Davy Jones as I ad wised. Howsomedever, bloodshed's best
awoided, says you, Master Don, lad; an' so, shiver my keelson! here
we lies stranded. What's the course to be steered now, I axes?
That's a matter o' argyment, says you; so here's for a whiff o' the
fragrant!”
Bidding his servant fetch pipe and tobacco, the captain seated
himself upon the canoe and fell to puffing meditatively, his
companions meanwhile discussing the situation and a project of their
own, with many anxious glances in the direction of the adjacent
jungle, where, for anything they knew to the contrary, the lascar
might even then be stealthily watching their movements.
“Shiver my smokestack! d'ye see that, now?” exclaimed the
captain at last, following with half-closed eye and tarry finger the
ascent of a perfect smoke-ring that had just left his lips. “An' what's
a ring o' tobackie smoke? says you. A forep'intin' to ewents to come,
says I. A ring means surrounded, d'ye see; an'—grape-shot an' gun-
swabs!—surrounded means fightin', lads!”
“Fun or fighting, I'm ready, anyhow!” cried Jack, flourishing his
knife.
“Ay, ay, lad; an' me, too, for the matter o' that,” replied the old
sailor, presenting his pipe at an imaginary foe like a pistol; “but when
our situation an' forces is beknownst to the enemy, we're sartin to
be surprised, d'ye mind me. An' so I gets an idee!
“Go palter to lubbers an' swabs, d'ye see?
'Bout danger, an' fear, an' the like;
A tight leetle boat an' good sea-room give me,
An' it ain't to a leetle I'll strike!”
Back they darted towards the entrance, but the lascar, anticipating
this manouvre, was on his guard. As Jack dashed past, the cunning
spy thrust out his foot and sent him sprawling on the flagstones.
Don, hearing the noise, turned back to his friend's assistance, and
by the time Jack regained his feet the lascar had reached the
entrance mid raised the hue-and-cry.
“This way!” cried Don, making for a narrow side door, as the
lascar's shouts began to echo through the precincts of the temple.
“Get your knife ready, he's raised the alarm!”
Through the door they dashed, only to find themselves in the
court, hemmed in on every side. The frenzied cries of the lascar
continued to ring through the enclosure; but, fortunately for the
mock pilgrims, so vast was the concourse of natives, and so
deafening the uproar, that only those nearest the shrine understood,
his words, while even they failed, as yet to penetrate the clever
disguise of the intruders. This gave them time to draw breath, and
look about them.
Close, on their left Jack's quick eye discovered an exit, about
which the crowd was less dense than elsewhere. The great doors
stood wide open, disclosing a narrow street. Between this exit and
the spot where they stood at bay, a number of sacred bulls were
quietly feeding off a great heap of corn which the devotees had
poured out upon the flags of the court. All this Jack's eyes took in at
a glance.
A roar, terrific as that of ten thousand beasts of prey, burst from
the surging multitude. The lascars words were understood. Glancing
quickly over his shoulder, Jack saw that this man, from his place
upon the steps of the shrine, was pointing them out.
Another instant, and their disguise would avail them nothing; the
maddened, fanatical crowd would be upon them.
“Don,” he said, in rapid, husky tones, as he grasped his friend's
hand for what he believed to be the last time, “there's but one
chance left us, and that's a slim one. You see the door on our left,
and those bulls? Do you take one of the two big fellows feeding side
by side, and I'll take the other. Use your knife to guide the brute,
and with God's help——”
A tremendous roar of voices and a thunderous rush-of feet cut his
words short.
“Now for it, old fellow!”
With one swift backward glance at the furious human wave
sweeping down upon them, they darted towards the bulls, of which
the two largest, accustomed to the daily tumult of town and temple,
were still composedly feeding, their muzzles buried deep in the
mound of corn.
Before the animals had time to lift their heads, the mock pilgrims
were on their backs and plying knives and heels upon their sleek
flanks.
Bellowing with pain and terror, the bulls, with tails erect and heads
lowered, charged the throng about the doorway, bowling them over
in all directions like so many ninepins. Before the infuriated crowd in
their rear understood the meaning of this unexpected manoeuvre,
the mock pilgrims were in the street.
It was a side street, fortunately, separated from the densely-
packed maidan by a high brick wall, and but few natives were about.
Those who followed them out of the temple, too, they soon
distanced, for their ungainly steeds made capital time.
But now a new, if less serious, danger menaced them. Apart from
the difficulty of clinging to the round, arched backs of the bulls, once
started, the maddened animals could not be stopped. Fortunately,
they took the direction of the hill-path.
On they tore, bellowing madly, and scattering showers of foam
and sand right and left, until, in an amazingly brief space of time,
they reached the outskirts of the town. Here, as if divining that their
services were no longer required, the bulls stopped abruptly,
shooting their riders off their backs into the sand with scant
ceremony.
“Regular buck-jumpers!” groaned Jack, rubbing his lacerated shins
ruefully. “Glad we're safe out of it, anyhow.”
“So am I. But I wonder where Spottie is?” said Don, fanning
himself with the loosened end of his turban.
Jack started up. “Never once thought of Spottie since we entered
the shrine,” cried he. “Come, we must go back and look him up.”
Their uneasiness on Spottie's account, however, was at that
instant set at rest by the precipitate appearance on the scene of
Spottie himself. Seeing his masters charge the crowd on the bulls'
backs, he had extricated himself from the crush, and followed them
with all possible speed.
“Dey coming, sar!” he panted, as he ran up, “Lascar debil done
fetching plenty black man!”
And there swelled up from the street below a tumult of voices that
left no doubt as to the accuracy of his statement.